React JS not working with Internet Explorer 9

前端 未结 2 1007
一生所求
一生所求 2020-12-25 13:40

I\'m trying to use React with Internet Explorer 9 but getting the following errors even trying to run something very barebones:

SCRIPT438: Object doesn\'t suppor

2条回答
  •  离开以前
    2020-12-25 14:15

    Generally, you need to include the specified polyfills for ES5 features (as you've noticed): https://facebook.github.io/react/docs/react-dom.html#browser-support

    You may also need HTML5 Shiv in addition to the the polyfills you've provided.

    More specifically, though, the problem is probably not with polyfills but with the document mode IE9 is running in. You want to make sure that you are setting the correct document mode in your HTML file so IE knows which version to target. Otherwise, even though you are using IE9 it may be targeting IE7 which is no good.

    
    

提交回复
热议问题