Pass window, not this to the main IIFE. Fixes #13760.#1238
Closed
mgol wants to merge 1 commit intojquery:masterfrom
Closed
Pass window, not this to the main IIFE. Fixes #13760.#1238mgol wants to merge 1 commit intojquery:masterfrom
mgol wants to merge 1 commit intojquery:masterfrom
Conversation
This is needed for node compatibility; there are many places dependent on window being the true window, not just the global object. We don't actually need node's global object inside the closure, it's exported using module.exports anyway.
Member
|
What happens when "window" is undefined? |
Member
Author
|
It breaks at the beginning then ( If that's the case, I can always change |
Member
|
Seems like this is right. jQuery won't work without the DOM. |
Member
Author
|
Yup, that's what I thought. So it should be OK then. Why was it changed to |
Member
|
For the reason I said above, but I prefer the approach here anyway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is needed for node compatibility; there are many places dependent
on window being the true window, not just the global object. We don't
actually need node's global object inside the closure, it's exported
using module.exports anyway.