JavaScript library to simulate Internet Explorer JavaScript environment?

后端 未结 2 769
囚心锁ツ
囚心锁ツ 2021-02-08 15:33

This is not a duplicate of the JS library to simulate Internet Explorer? question about simulating Internet Explorer\'s CSS support; this is about JavaScript functions.

<

2条回答
  •  庸人自扰
    2021-02-08 16:01

    I'd advise against that, because you'd be testing how well you support this simulation then, not IE7 itself. IE7 engine is mostly compliant with standards, save for a few quirks (like bad reaction at dangling commas) and of course, missing environment from most recent standards. Most of those quirks are either in line with other browsers or cannot be easily emulated without writing complete JS engine in JS. You may want to consult a list on ES wiki for more details (and note "FF/Opera/Safari: same" sections, where you will likely want not to account for IE's discrepancies with ES).

    Your best bet would be to either use a real IE7, that, BTW, have very good automation interface for pretty much any testing, or, at very least, more recent IE version with compatibility mode turned on.

提交回复
热议问题