Skip to content
Permalink
Browse files
Add test for appending an xml element to another. Supplements #9370.
  • Loading branch information
timmywil committed May 26, 2011
1 parent bdce86d commit 9d4033d629fbfd1352e4ee5f20d0d320a61b80f1
Showing 1 changed file with 34 additions and 0 deletions.
@@ -465,6 +465,40 @@ test("append the same fragment with events (Bug #6997, 5566)", function () {
jQuery("#listWithTabIndex li.test6997").eq(1).click();
});

test("append(xml)", function() {
expect( 1 );

function createXMLDoc() {
// Initialize DOM based upon latest installed MSXML or Netscape
var elem,
aActiveX =
[ "MSXML6.DomDocument",
"MSXML3.DomDocument",
"MSXML2.DomDocument",
"MSXML.DomDocument",
"Microsoft.XmlDom" ];

if ( document.implementation && "createDocument" in document.implementation ) {
return document.implementation.createDocument( "", "", null );
} else {
// IE
for ( var n = 0, len = aActiveX.length; n < len; n++ ) {
try {
elem = new ActiveXObject( aActiveX[ n ] );
return elem;
} catch(_){};
}
}
}

var xmlDoc = createXMLDoc(),
xml1 = xmlDoc.createElement("head"),
xml2 = xmlDoc.createElement("test");

ok( jQuery( xml1 ).append( xml2 ), "Append an xml element to another without raising an exception." );

});

test("appendTo(String|Element|Array&lt;Element&gt;|jQuery)", function() {
expect(16);

3 comments on commit 9d4033d

@sradoff
Copy link

@sradoff sradoff commented on 9d4033d May 27, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help me understand where to download 1.6.2 min. I am only seeing 1.6.1 release candidates.

@timmywil
Copy link
Member

@timmywil timmywil commented on 9d4033d May 27, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has not been released yet. The git version is available here: http://code.jquery.com/jquery-git.js

@sradoff
Copy link

@sradoff sradoff commented on 9d4033d May 31, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great. When do you think this will be released?

Please sign in to comment.