I would compare this solution as well, more compact and I guess faster as
well:
// check if an element is in a (or is an) XML document
isXMLDoc: function( elem ) {
return ((elem.ownerDocument || elem).documentElement ||
false).nodeName !== "HTML";
},
Regards
On Mon, Jul 27, 2009 at 2:04 PM, John Resig <[email protected]> wrote:
> isXMLDoc had changed since you had last made a patch, however I made, and
> applied, a new one. Also took the opportunity to write up some decent unit
> tests for isXMLDoc.
>
> http://dev.jquery.com/changeset/6510
>
> --John
>
>
>
> On Mon, Jul 27, 2009 at 7:53 AM, Christiaan Baartse <[email protected]
> > wrote:
>
>>
>> Since posting links to tickets with patches here pays off I'm doing it
>> aswell!
>> http://dev.jquery.com/ticket/4833
>> http://dev.jquery.com/attachment/ticket/4833/isXml.patch
>>
>> It just needs a review... altought its just 1 lil extra test in an if
>> statement and a commit.
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---