سؤال

Is it possible to use the Chrome developer tools and set a page to use different ECMAScript standards? Basically I need to debug IE8 JavaScript but I hate using the IE8 developer tools and would like to continue using the Chrome developer tools. Hence I would like to set a page to use the ES3 standard instead of ES5 and debug it. Is there a way to do this?

هل كانت مفيدة؟

المحلول

No. Currently it's not possible to switch to ES3-only in Chrome.

You can activate some of the ES6 features, on top of existing ES5 ones, using "Enable Experimental JavaScript" flag. So you can go forward but not back.

As ES6 continues to roll out, you probably won't be able to do go back to "just ES5" either. My understanding is that it's not worth keeping such "switches" in the engine, increasing complexity and size, while decreasing maintainability.

You can get pretty close to "ES3-only" by testing in older browsers like Safari 3.x or Opera 9.x (if you're avoiding IE8).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top