Hi,I've been trying to understand the https://chromedevtools.github.io/devtools-protocol/tot/ for my development, but I can't quite figure out the proper way to inject JS code into the headless instance.Originally, I had thought that I would use Page.addScriptToEvaluateOnLoad,
but that doesn't seem to do anything for me (it runs, returns a script id, but does not seem to have any effect on the browser). The only things I've been able to do have been running one liners using Runtime.evaluate, but for cases where I'd want to inject either jquery or lodash, I don't see how to make this possible without referencing an external site using script tags as part of the data:text/html I create. I wasn't sure if maybe I needed to use Runtime.compileScript/runScript, but I don't quite understand what the sourceUrl would be if I'm defining the expression. I'm using the chrome-remote-interface library to do all this in NodeJS in an effort to replace a service using PhantomJS.I'm very new to these DevTools Protocols, so if anyone also happens to know of any other documentation that may shed more light as to what each Domain's methods are actually doing, that would be greatly appreciated.Thanks,Michael
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev+unsubscribe@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/f5e3768a-dc62-4dcf-b18e-867a529cd367%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.