Closed Bug 685798 Opened 14 years ago Closed 14 years ago

Node.parentElement not implemented

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: bugzilla33, Assigned: smaug)

References

()

Details

(Keywords: addon-compat, dev-doc-complete)

Attachments

(3 files)

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
Attached file testcase
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)
Assignee: nobody → Olli.Pettay
OS: Windows 7 → All
Hardware: x86 → All
Version: 7 Branch → Trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true
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
Attached patch patchSplinter Review
Attachment #559443 - Flags: review?(bzbarsky)
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
Closed: 14 years ago
Resolution: --- → DUPLICATE
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+
Keywords: dev-doc-needed
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Keywords: addon-compat
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.
Target Milestone: --- → mozilla9
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: