How to turn off strict mode when using Phantomjs -



when using phantomjs in our project in conjunction base2 library, getting following error:

+ phantomjs ...../src/test/javascript/specrunner.html typeerror: setting property has getter 

can point out how fix issue? seems occurs due javascript "strict mode" inside phantomjs (refer here), not find phantomjs docs on how turn off, since occurs in external lib (base2.js) need?

thanks,
paddy

base2.js not seem define "use strict". means in 1 of javascript files have "use strict" line outside of function. turns on strict mode @ point defined , can not turn off again. better turn on inside function declarations.

to figure out problem, search "use strict" or 'use strict' in files included in project. remove them or move them inside function bodies.

https://developer.mozilla.org/en-us/docs/web/javascript/reference/functions_and_function_scope/strict_mode

can disable ecmascript strict mode specific functions?


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -