-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Core: Deprecate jQuery.nodeName #3505
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
Conversation
|
@karan-96, thanks for your PR! By analyzing the history of the files in this pull request, we identified @davids549, @gibson042 and @flesler to be potential reviewers. |
|
Thanks for the PR. However, more things are needed for this to land:
define( [
/* other code */
"./core/var/nodeName"
], function ( /* other code */ nodeName ) {
"use strict";
/* other code */
jQuery.nodeName = nodeName;
} );
You can see 1b9575b for what was needed for the Would you like to apply those changes? If you have any doubts about what has to be done just ask. |
|
yes i would like to work on this. |
|
Cool! Let us know if you stumble upon any problems. |
|
@mgol sir, my 'src/core/var/nodeName.js' looks like and i need to include its definition(the one you mentioned above) via AMD everywhere jQuery.nodeName has been used. Am i getting your 1st point correct? |
|
@karan-96 The function passed to Also, now that I look at it it probably doesn't have to be a |
|
@mgol sir, 2.And do i have to write a new test for nodeName and include it in deprecate.js? |
|
@karan-96 In tests just use |
09e5246 to
5ec2bcd
Compare
|
@karan-96 Do you think you'll have time to move the unit tests soon? |
|
@mgol ,i did not find any test for jquery.nodeName. please tell me if i am missing something? |
|
@karan-96 You're right, this is a private API so there was no tests for it. A couple remarks:
Could you apply those changes? |
mgol
left a comment
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.
Please apply the changes I mentioned in my last comment.
|
yes , i will apply these changes. |
e56c8e1 to
a4ad702
Compare
|
@mgol sir i have applied the changes.please review them ? |
timmywil
left a comment
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.
Just one more change! Thanks!
src/deprecated.js
Outdated
| } | ||
| }, | ||
| nodeName: function( elem, name ) { | ||
| return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); |
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.
Only one thing left in my mind. Import src/core/nodeName.js in this file and set nodeName: nodeName rather than writing the function twice.
|
Landed, thanks @karan-96! |
|
thank you all for your guidance throughout. |
Summary
fixes issue #3475
Checklist