Changing the content of a JavaScript file before it runs.
Posted: Sat Oct 26, 2019 7:18 pm
Hi.
I'm automating a web-based application that loads some JavaScript files from the server.
One of them I need to intercept as soon as it gets loaded, but before it runs (the JS code gets executed by the main document itself, not by my application).
I'd like to be able to retrieve, edit and replace the JavaScript doc entirely, as pure text.
Is there a way (without DOM Visitor) to do this? Perhaps an event?
Thanks in advance.
I'm automating a web-based application that loads some JavaScript files from the server.
One of them I need to intercept as soon as it gets loaded, but before it runs (the JS code gets executed by the main document itself, not by my application).
I'd like to be able to retrieve, edit and replace the JavaScript doc entirely, as pure text.
Is there a way (without DOM Visitor) to do this? Perhaps an event?
Thanks in advance.