-
-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
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
Wrap IE specific files to properly set methods on window or global #628
Conversation
…with a self-executing fnc and a "use strict" string.
Have you tested this in IE? I seem to remember the function declarations being essential in making this work at all. |
I've only tested in IE8 but only manually making changes in the buster scaffolding file. I'm having difficulty running the test page in this repo because the dependencies are out of date. I just ran npm install and http-server in the root dir. I'm not sure what the issue is but a little help would be... Helpful :D I found an article regarding setting the functions: http://www.adequatelygood.com/Replacing-setTimeout-Globally.html Once the repo is updated I can test out the solution from the article. |
Hey, not sure I should be in this project. You might have me mixed up with someone else. |
@cjno sorry wrong person. |
@GCheung55 No worries, good luck and merry christmas |
…t-Globally.html to make global methods replaceable.
...but the tests pass in IE7 and up? I'm not sure IE6 support is very relevant anymore. |
@cjohansen I did some more digging. The main issue is that the dev dependencies are out of date, as I described in #630. After I manually changed This comment may not bode well for the PR, but a caveat is that the IE specific files needs to execute before anything else. That said, I would like you to still consider accepting this PR because of the findings in the http://www.adequatelygood.com/Replacing-setTimeout-Globally.html article, especially in the section "A Better Solution". |
That's awesome, thanks! 9ac6834 |
Closing because the changes were added. |
Unwrapped code can cause issues with
this
if the code is appended to other code that has 'use strict' defined outside of a function scope.To prevent any issues in reference to
this
, wrap the IE code in a self-executing function and make any changes to a reference towindow
orglobal
.