mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Optimizing isXMLDoc.
This commit is contained in:
parent
6fc57be843
commit
b964e56946
@ -311,8 +311,7 @@ jQuery.extend({
|
|||||||
|
|
||||||
// check if an element is in a (or is an) XML document
|
// check if an element is in a (or is an) XML document
|
||||||
isXMLDoc: function( elem ) {
|
isXMLDoc: function( elem ) {
|
||||||
return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
|
return (elem.ownerDocument || elem).documentElement.nodeName !== "HTML";
|
||||||
!!elem.ownerDocument && elem.ownerDocument.documentElement.nodeName !== "HTML";
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Evalulates a script in a global context
|
// Evalulates a script in a global context
|
||||||
|
Loading…
Reference in New Issue
Block a user