javascript - PhantomJS - Injected JS Does Not Run After JS Error -


i have phantomjs script looks so:

window.settimeout(function() { //give page couple seconds load before injecting our scripts         //include our version of jquery our injected js can run         page.includejs('//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js', function() {             if (!page.injectjs(js)) {                 console.log("unable inject js @ " + js);                 phantom.exit(1);             }         });     }, 2000); 

the js being injected runs , executes window.callphantom call terminates script. issue js injected onto page dictated end user. end user supply e.g. http://www.google.com or else.

it appears if page has js errors, injected javascript not run. since not control content of page, there no way me prevent these js errors.

is there way injected javascript run despite previous js errors generated on page?


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -