Bug in how Element.extend detects XML Nodes
Reported by John-David Dalton | July 30th, 2008 @ 09:38 PM
I found an issue with a patch we applied earlier in the way we detect xml nodes
// Filter out XML nodes in IE.
if (!(element.ownerDocument || element).body) return element;
This will cause a false positive when extending an element before document.body loads
for example:
new Element('div'); //would not be extended in IE
Comments and changes to this ticket
-
John-David Dalton July 31st, 2008 @ 07:07 AM
- no changes were found...
-
John-David Dalton July 31st, 2008 @ 02:44 PM
- → Tag changed from to patched
- → State changed from new to bug
W3C states that document.write and element.innerHTML should not work when serving XHTML (correct MIME type) but the method still exists and from my tests seems to still detect properly. References: http://www.w3.org/TR/WCAG20-TECH... .ownerDocument and createDocumentFragment() are not supported by IE 5.5- (Prototype doesn't support those browsers but I figured I would let yall know) http://www.quirksmode.org/dom/w3... -
John-David Dalton July 31st, 2008 @ 02:49 PM
- no changes were found...
-
John-David Dalton July 31st, 2008 @ 02:49 PM
I have attached an alternate version that doesn't check for the existance of .ownerDocument because by this time, after the first set of conditions, we can safely assume that "element" is an element and will have the .ownerDocument property.
-
Tobie Langel October 1st, 2008 @ 01:53 PM
- → Milestone cleared.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
