aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-07-19 13:32:53 +0000
committerJohn Resig <jeresig@gmail.com>2009-07-19 13:32:53 +0000
commit48e9a3999596c2ee1f4470a78637de8f27e3b219 (patch)
tree8f4c68775a0645be21cce8d49cd6959d000bfb00 /src/attributes.js
parent0d5c3a68a092401089c9242bdafdb1b2534feb6a (diff)
downloadjquery-48e9a3999596c2ee1f4470a78637de8f27e3b219.tar.gz
jquery-48e9a3999596c2ee1f4470a78637de8f27e3b219.zip
Standardize on using .nodeName in place of .tagName. Fixes jQuery bug #4923.
Diffstat (limited to 'src/attributes.js')
-rw-r--r--src/attributes.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/attributes.js b/src/attributes.js
index 041bb29fc..de1d331b0 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -192,7 +192,7 @@ jQuery.extend({
if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
return undefined;
- var notxml = !elem.tagName || !jQuery.isXMLDoc( elem ),
+ var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),
// Whether we are setting (or getting)
set = value !== undefined;
@@ -200,7 +200,7 @@ jQuery.extend({
name = notxml && jQuery.props[ name ] || name;
// Only do all the following if this is a node (faster for style)
- if ( elem.tagName ) {
+ if ( elem.nodeType === 1 ) {
// These attributes require special treatment
var special = /href|src|style/.test( name );