Skip to content
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

#2773 - $.fn.is to accept jQuery and node objects #206

Merged
merged 4 commits into from Apr 10, 2011

Conversation

timmywil
Copy link
Member

See new traversing.js tests. It does seem the performance is in line and it is safe to say there is no loss.
Performance tests: http://jsperf.com/jquery-fn-is

http://bugs.jquery.com/ticket/2773

http://bugs.jquery.com/ticket/8609 (both filter and not now return an empty selection on any invalid argument)

@jeresig jeresig merged commit 85232c9 into jquery:master Apr 10, 2011
@staabm
Copy link
Contributor

staabm commented Apr 11, 2011

on jsperf there is a second revision of this patch (dont know if you merged v1 or v2 of the patch)

in case you merged revision2... v2 runs into problems on FF4 (winxp), see http://jsperf.com/jquery-fn-is/2

TypeError: c.replace is not a function.

message: c.replace is not a function
fileName: http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
lineNumber: 16
stack: ([object HTMLDivElement],[object Object])@http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js:16 ([object Object],[object Object])@http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js:16 ([object Object])@http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js:16 ()@http://jsperf.com/jquery-fn-is/2:130 ([object NPObject JS wrapper class])@http://jsperf.com/jquery-fn-is/2:0 ([object Object])@http://a.jsperf.com/benchmark-140.js:8 al()@http://a.jsperf.com/benchmark-140.js:8 C(true)@http://a.jsperf.com/benchmark-140.js:8 au()@http://a.jsperf.com/benchmark-140.js:8 (-10)@http://a.jsperf.com/benchmark-140.js:8 

TypeError: c.replace is not a function.

message: c.replace is not a function
fileName: http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
lineNumber: 16
stack: ([object HTMLDivElement],[object HTMLDivElement])@http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js:16 ([object HTMLDivElement],[object Object])@http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js:16 ([object HTMLDivElement])@http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js:16 ()@http://jsperf.com/jquery-fn-is/2:131 ([object NPObject JS wrapper class])@http://jsperf.com/jquery-fn-is/2:0 ([object Object])@http://a.jsperf.com/benchmark-140.js:8 al()@http://a.jsperf.com/benchmark-140.js:8 C(true)@http://a.jsperf.com/benchmark-140.js:8 au()@http://a.jsperf.com/benchmark-140.js:8 (-10)@http://a.jsperf.com/benchmark-140.js:8 

@timmywil
Copy link
Member Author

That perf is probably stale. If you could reproduce an issue on jsfiddle.net using jquery(edge), please submit to bugs.jquery.com.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 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.

None yet

3 participants