Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

IE6 - IE9的setTimeout只读问题 #4

Closed
miniflycn opened this issue Oct 27, 2014 · 1 comment
Closed

IE6 - IE9的setTimeout只读问题 #4

miniflycn opened this issue Oct 27, 2014 · 1 comment
Labels

Comments

@miniflycn
Copy link
Member

IE6 - IE9中,setTimeout为只读属性无法复写。

这让我们重新思考tryjs的定位问题。起初我们是为了解决Script Error: 0无法定位问题,通过try catch我们是可以得到error.stack来得到错误准确的定位,但IE6 - IE9时候中,error是没有stack的,这导致我们还是没法获取正确定位,那么实际问题就变成:

tryjs到底需不需要服务IE6 - IE9?

实际上,重新考虑下是不需要的,IE6 - IE9利用window.onerror跟踪问题是一样的,使用tryjs反而导致性能下降了,所以未来tryjs将不支持IE6 - IE9,建议IE6 - IE9利用window.onerror进行错误上报。

@miniflycn
Copy link
Member Author

特性判断依据:

try {
   badjsIngore();
} catch (e) {
  if (e.stack) {
    // 初始化
    init();
  }
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant