slimerjs icon indicating copy to clipboard operation
slimerjs copied to clipboard

Can I disable the SlimerJS default strict mode?

Open assafey opened this issue 8 years ago • 5 comments

versions

  • SlimerJS: 0.906.2
  • Firefox: 46.0.1
  • Operating system: Mac, El-Capitan

Steps to reproduce the issue

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?

assafey avatar Sep 19 '16 13:09 assafey

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.

wskorodecki avatar Sep 20 '16 15:09 wskorodecki

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

laurentj avatar Mar 08 '17 07:03 laurentj

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

chipironcin avatar Apr 19 '17 10:04 chipironcin

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 avatar Apr 16 '19 17:04 sonickseven

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 😉

sonickseven avatar Apr 25 '19 20:04 sonickseven