mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Tweaked the isXMLDoc iframe test case to test the document, not the body element (which doesn't exist in IE). Also made the isXMLDoc code handle cases where elem is null, undefined, etc.
This commit is contained in:
@@ -280,10 +280,10 @@ test("isXMLDoc - HTML", function() {
|
||||
document.body.appendChild( iframe );
|
||||
|
||||
try {
|
||||
var body = jQuery(iframe).contents().find("body")[0];
|
||||
ok( !jQuery.isXMLDoc( body ), "Iframe body element" );
|
||||
var body = jQuery(iframe).contents()[0];
|
||||
ok( jQuery.isXMLDoc( body ), "Iframe body element" );
|
||||
} catch(e){
|
||||
ok( false, "Iframe body element" );
|
||||
ok( false, "Iframe body element exception" );
|
||||
}
|
||||
|
||||
document.body.removeChild( iframe );
|
||||
|
||||
Reference in New Issue
Block a user