axetroy / axetroy/stackoverflow
IE 浏览器之 `import` 关键字
Open
IE浏览器
浏览器兼容性
- Dominant language
- No language data
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
想象一下这样的代码
```js
function Module () {}
Module.prototype.import = function (id) {/* 加载模块 */}
```
这样的代码,随便丢到哪个主流浏览器都可以支持
但是唯独 `IE`, `keyword` 是关键字,哪怕它只是一个属性
也就意味着,一下哪种方式,在 IE 下都会抛出异常
```js
const obj = {
import: () => {} // throw in IE
}
function Module () {}
Module.import = function () {} // throw in IE
System.import('/xxx.js'); // throw in IE
```
IE,什么时候才能死绝...
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.