laurentj / slimerjs

A scriptable browser like PhantomJS, based on Firefox
http://slimerjs.org
Other
3k stars 258 forks source link

Can I disable the SlimerJS default strict mode? #535

Open assafey opened 8 years ago

assafey commented 8 years ago

versions

just navigate to Wikipedia main page with SlimerJS

Actual results:

Multiple javascript strict warnings

Expected results:

No warnings

Question:

Can I disable the SlimerJS default strict mode?

wskorodecki commented 8 years ago

Yes, just create slimerjs/lib/slimer/defaults/preferences/prefs.js file in slimerjs directory and add:

pref("javascript.options.strict", false); // Show JS errors only.
laurentj commented 7 years ago

we could have a command line flag to enable/disable it

chipironcin commented 7 years ago

+1 to have a command line option to override slimerjs prefs from defaults/preferences/prefs.js

sonickseven commented 5 years ago

Yes, just create slimerjs/lib/slimer/defaults/preferences/prefs.js file in slimerjs directory and add:

pref("javascript.options.strict", false); // Show JS errors only.

i was searching this path a never i found it, my slimerjs directory is /usr/local/lib/node_modules/slimerjs/

sonickseven commented 5 years ago

Yes, just create slimerjs/lib/slimer/defaults/preferences/prefs.js file in slimerjs directory and add:

pref("javascript.options.strict", false); // Show JS errors only.

i was searching this path a never i found it, my slimerjs directory is /usr/local/lib/node_modules/slimerjs/

the file path is:

/usr/local/lib/node_modules/slimerjs/src/defaults/preferences/prefs.js

later only you change the text pref("javascript.options.strict", true) to pref("javascript.options.strict", false) and all ok

And close this issue 😉