Fix #12048. Set attributes for XML fragments. Close gh-965.

This commit is contained in:
Sai Wong
2012-10-15 14:20:36 -04:00
committed by Dave Methvin
parent 144b8bfead
commit 2b0e720406
4 changed files with 28 additions and 1 deletions

View File

@@ -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 + "" );