using jQuery.nodeName where applicable #344

Closed
wants to merge 2 commits into
from

2 participants

@jboesch

I noticed we were using jQuery.nodeName (comparison) in places and not in others. Figured it's good to be consistent.

I didn't touch the function cloneFixAttributes as it's doing multiple checks on the nodeName but it's storing it in a local var. Replacing it with jQuery.nodeName would prob hurt performance a little.

@jeresig jeresig commented on the diff Apr 23, 2011
src/event.js
@@ -707,7 +707,7 @@ if ( !jQuery.support.submitBubbles ) {
jQuery.event.special.submit = {
setup: function( data, namespaces ) {
- if ( this.nodeName && this.nodeName.toLowerCase() !== "form" ) {
@jeresig
jQuery Foundation member
jeresig added a line comment Apr 23, 2011

We can remove the this.nodeName && check as well, since that's in jQuery.nodeName.

@jboesch
jboesch added a line comment Apr 23, 2011

Good call. Removing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jboesch

fixed.

@jeresig
jQuery Foundation member

Landed in commit 02ad0aa.

@jeresig jeresig closed this Apr 23, 2011
@davidpenuelab davidpenuelab pushed a commit that referenced this pull request Dec 3, 2013
@jboesch jboesch Landing pull request 344. using jQuery.nodeName where applicable.
More Details:
 - #344
02ad0aa
@mescoda mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
@jboesch jboesch Landing pull request 344. using jQuery.nodeName where applicable.
More Details:
 - jquery#344
2704524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment