date |
---|
Mon Aug 07 2017 15:38:36 GMT+1000 (AEST) |
-
trying to use
chrome-remote-interface
to dynamically update js source at runtime, following example here: https://github.com/cabul/electron-hot/blob/master/lib/index.js -
I can see the script ID, it appears to be the same each time I run (although I do expect it will change at some point in future)
-
calling
client.Debugger.setScriptSource
- seems to be firing the error callback with an arg of
true
- ahh ok looks like
scriptId
needs to be a string, not an int
- seems to be firing the error callback with an arg of
-
found this example here too: https://gist.github.com/paulirish/920a260cadfe05e8388c
-
getScriptSource
is working, not seeing any change after callingsetScriptSource
though -
but if I call
getScriptSource
a second time, I do see the new source. So it was set, it just didn't do anything in the browser window -
one big roadblock here: as soon as I open the debugger console in the electron BrowserWindow, my remote debugger websocket requests all fail
- looks like someone else found this too: https://gitter.im/mattdesl/wtch?at=54dceedde0d4eb7f0a49b6c1
-
at some point I'll try to make a small demo showing this stuff.
-
there seems to be some aggressive caching of
<script>
js files when loaded via a local node http server...- adding
?v=...
busts the cache
- adding