We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
参考 imweb/tryjs#4 在浏览器环境下 window.setTimeout === setTimeout; 在 IE6-9 下, setTimeout 是只读的, window 是可写的, 重写 window.setTimeout 将会导致 以上等式不成立 以下代码结果为上述浏览器下的测试结果
typeof window.setTimeout; // object window.setTimeout === setTimeout; // true var temp = window.setTimeout; window.setTimeout = function(fn, delay){ return temp(fn, delay); }; typeof window.setTimeout; // function window.setTimeout === setTimeout; // false temp === setTimeout; // true typeof window.xxx; // undefined window.xxx = 'hehe'; typeof window.xxx; // string window.xxx; // hehe xxx; // hehe
Sorry, something went wrong.
No branches or pull requests
所以,我们只对 window.setTimeout 进行切面处理。当然我们为了保证统一,也只对window.setInterval 进行了同样处理
所以不能对 window.setTimeout 或 window.setInterval 像其他切面处理那样直接进行 apply 。
The text was updated successfully, but these errors were encountered: