详解React项目中碰到的IE问题
最近接手一个React项目,在IE下碰到了俩问题IE11报错如下:跟踪一下之后,发现是一些其他的npm包里面用到了startsWith这个方法,可以自己polyfill一下:if (!String.prototype.startsWith) {String.prototype.startsWith
最近接手一个React项目,在IE下碰到了俩问题IE11报错如下:跟踪一下之后,发现是一些其他的npm包里面用到了startsWith这个方法,可以自己polyfill一下:if (!String.prototype.startsWith) {String.prototype.startsWith
典型代码示例 实现代码如下: yepnope({ test : Modernizr.geolocation, yep : 'normal.js', nope : ['polyfill.js', 'wrapper.js'] });当Modernizr.geolocation为真时,加载yep项也就是”