aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSai Wong <sai.wong@huffingtonpost.com>2012-10-15 14:20:36 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-10-20 15:27:43 -0400
commit2b0e720406c42a4065010ba94e7adb7170ba74c3 (patch)
tree9b895ae823c20230f7be9d33bd3d9c4359c34600 /src
parent144b8bfeadc5316656105e1a10a31ba5348ef5d6 (diff)
downloadjquery-2b0e720406c42a4065010ba94e7adb7170ba74c3.tar.gz
jquery-2b0e720406c42a4065010ba94e7adb7170ba74c3.zip
Fix #12048. Set attributes for XML fragments. Close gh-965.
Diffstat (limited to 'src')
-rw-r--r--src/attributes.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js
index 5a6749982..68e763e09 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -523,7 +523,7 @@ if ( !getSetAttribute ) {
// Set the existing or create a new attribute node
var ret = elem.getAttributeNode( name );
if ( !ret ) {
- ret = document.createAttribute( name );
+ ret = elem.ownerDocument.createAttribute( name );
elem.setAttributeNode( ret );
}
return ( ret.value = value + "" );