if you use element = $(element); you shouldnt have to worry about IE,
because the element will be extended and it will have the descendentOf
method.
Also if I tweak the condition IE will be handled by the first
condition now.
Also maybe checking
element.descendantOf(element.ownerDocument.documentElement)
Element.addMethods({
isOrphaned: function(element) {
element = $(element);
if (element.sourceIndex !== null) return element.sourceIndex < 1;
if (element.id) return !
element.ownerDocument.getElementById(element.id);
return !
element.descendentOf(element.ownerDocument.documentElement);
}
});
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---