User Agent: Mozilla/5.0 (Windows NT 6.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Build ID: 20110902133214 Steps to reproduce: 1. open testcase 2. click TEST button Actual results: Node.parentElement not implemented Expected results: alerts: HTMLHtmlElement, null
Note: document.documentElement.parentElement MUST alerts null unlike document.documentElement.parentNode
IE, Chrome, Safari, Opera and Konqueror support parentElement
(Opera at least doesn't seem to support parentElement in all the nodes. Chrome does. Don't know about others)
OS: Windows 7 → All
Hardware: x86 → All
Version: 7 Branch → Trunk
Opera has an open bug on moving parentElement elsewhere. We are waiting on feedback from Gecko (or an implementation) before moving ahead.
Attachment #559394 - Attachment mime type: text/plain → text/html
Comment on attachment 559443 [details] [diff] [review] patch Review of attachment 559443 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/base/test/test_bug685798.html @@ +35,5 @@ > +is(df.firstChild.firstChild.parentElement, df.firstChild, > + "Text node's parent should be element."); > + > +is(document.createTextNode("foo").parentElement, null, > + "Text node shouldn't have parent element."); The test isn't clear: is it because it is a text node or because it is out of any document and has no parent?
I should be clear in the context it is in. But I can change the text.
We already have a bug on file for this...
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 609856
Ms2ger, you planning to land that patch? ;)
Actually, reopening this bug, since this patch is better than the old one.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment on attachment 559443 [details] [diff] [review] patch Should the new prop go at the end of the interface to reduce the chance of people running into vtable issues? Maybe it doesn't matter... You need to rev the iids of all interfaces inheriting from nsIDOMNode. Use http://people.mozilla.org/~sfink/uploads/update-uuids for that. r=me with the latter fixed and the former at least considered.
Attachment #559443 - Flags: review?(bzbarsky) → review+
Status: REOPENED → RESOLVED
Last Resolved: 8 years ago → 8 years ago
Resolution: --- → FIXED
Documentation written: https://developer.mozilla.org/en/DOM/Node.parentElement Updated: https://developer.mozilla.org/en/DOM/Node Also listed on Firefox 9 for developers.
Keywords: dev-doc-needed → dev-doc-complete
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.