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)
Opera has an open bug on moving parentElement elsewhere. We are waiting on feedback from Gecko (or an implementation) before moving ahead.
Created attachment 559443 [details] [diff] [review] patch
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...
Ms2ger, you planning to land that patch? ;)
Actually, reopening this bug, since this patch is better than the old one.
6 years ago
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.
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.
5 years ago