-
Notifications
You must be signed in to change notification settings - Fork 20.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Submodule sizzle
updated
6 files
+1 −0 | AUTHORS.txt | |
+5 −5 | bower.json | |
+2 −2 | dist/sizzle.js | |
+1 −1 | dist/sizzle.min.js | |
+1 −1 | dist/sizzle.min.map | |
+1 −1 | sizzle.js |
c93f91e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timmywil why was undefined removed? Shouldn't it protect jQuery from user overwriting the
undefined
variable? Thanksc93f91e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@serbanghita It's because most projects don't protect against such overwriting so if anyone does that (but.. why?) they're already screwed on so many levels...
c93f91e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't
undefined
turned into an undefined variable to reduce size on minification? Not familiarized with the codebase btw, just watching.c93f91e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't saving us that much so the team agreed we'd rather not have it.
c93f91e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any benefit in removing
undefined
?c93f91e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidmurdoch There isn't enough benefit in having it. But yes, one benefit is that it clears up parameters for an eventual jQuery-creating factory (where jQuery could be re-created with a different context and we can document the factory's signature without worrying about this unnecessary undefined variable). We could do
var undefined
instead at the top of the closure, but like I said, there isn't enough benefit.c93f91e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do wonder what the GZIP byte diff is for
undefined
parameter vsvar undefined
, vs the omittedundefined?
If you have them, can you publish them here?