devtool
devtool copied to clipboard
Loading Images from relative path
Trying this:
var img = new Image()
img.src = 'foo/bar.png'
Seems to error out since it's trying to load from file:// instead of http:// protocol. Will explore further.
Tracking upstream: https://github.com/atom/electron/issues/4444
Ok, this is fixed in 1.8.2.
If there is another fix to electron#4444 then maybe we could have better error codes and overall cleaner handling for resources that aren't the main index.html.
What about script.src = 'script.js' loading script from directory where devtool was run, not from devtool's directory itself?
Thanks @NekR, it seems like a related bug. Still struggling to find a clean solve, you can see some suggestions and their issues in electron#4444.