Skip to content

shortern constructor reference resolving and prototype wiring#176

Closed
yangjh wants to merge 2 commits intojquery:masterfrom
yangjh:master
Closed

shortern constructor reference resolving and prototype wiring#176
yangjh wants to merge 2 commits intojquery:masterfrom
yangjh:master

Conversation

@yangjh
Copy link

@yangjh yangjh commented Jan 11, 2011

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

@davidmurdoch
Copy link

I thought JS ninjas were a good thing.

Qk <---- ninja (turn your head sideways)

@dmethvin
Copy link
Member

dmethvin commented Apr 6, 2011

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.

@dmethvin dmethvin closed this Apr 6, 2011
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants