shortern constructor reference resolving and prototype wiring#176
Closed
yangjh wants to merge 2 commits intojquery:masterfrom
Closed
shortern constructor reference resolving and prototype wiring#176yangjh wants to merge 2 commits intojquery:masterfrom
yangjh wants to merge 2 commits intojquery:masterfrom
Conversation
|
I thought JS ninjas were a good thing. Qk <---- ninja (turn your head sideways) |
Member
|
Since there isn't a ticket addressed by this pull request and it doesn't solve a problem, I'm going to close it. Code cleanup and simplification is a good idea but I'd prefer to do it in the context of other work such as bug fixes in the same region. |
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.
change return new jQuery.fn.init( selector, context );
to return new init( selector, context ); so that reference path is shorten
change jQuery.fn = jQuery.prototype = {
to jQuery.fn = init.prototype = {
remove jQuery.fn.init member make the core smaller
remove confusing line jQuery.fn.init.prototype = jQuery.fn;
rerun all test case passed, rerun all speed test, performance almost the same though, but not slower
benefit: less ninja-ish