简体   繁体   中英

Using Chrome Dev Tools With Different ECMAScript standard

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM