Fix bootstrap: global should be this, not window
In a javascript context, all JS function are not all attached to the window object. This is the case of 'native' functions. In SlimerJS, the 'require' function is not attached to the window object. It is a standalone function.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -309,4 +309,4 @@ CasperError.prototype = Object.getPrototypeOf(new Error()); | ... | @@ -309,4 +309,4 @@ CasperError.prototype = Object.getPrototypeOf(new Error()); |
309 | if (phantom.casperScript && !phantom.injectJs(phantom.casperScript)) { | 309 | if (phantom.casperScript && !phantom.injectJs(phantom.casperScript)) { |
310 | return __die('Unable to load script ' + phantom.casperScript + '; check file syntax'); | 310 | return __die('Unable to load script ' + phantom.casperScript + '; check file syntax'); |
311 | } | 311 | } |
312 | })(window, phantom); | 312 | })(this, phantom); | ... | ... |
-
Please register or sign in to post a comment