Closed
Bug 609856
Opened 15 years ago
Closed 14 years ago
Implement Node.parentElement
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 685798
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
()
Details
(Whiteboard: [wdc][needs tests])
Attachments
(1 file)
9.20 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
Web DOM Core formally defines it, and all our colleagues already support it.
Comment 1•15 years ago
|
||
Pardon my asking a peanut gallery question, but why is parentElement a good idea? As far as I can tell, it's just the parent node (unless the parent node isn't an element, in which case the parentElement property is null). Sounds more like an optimization (skipping the nodeType check on the parent node) than an actual improvement.
![]() |
||
Comment 4•14 years ago
|
||
If we expect people to use this extensively (do we?) we should quickstub and fast-path it....
Comment on attachment 511947 [details] [diff] [review]
Patch v1
r=me, though don't land this unless you also have tests checking things like nodes inside documents and nodes inside docfragments. And by nodes I mean both textnodes and elements.
But yeah, fast-pathing also seems like something we should do.
Attachment #511947 -
Flags: review?(jonas) → review+
Assignee | ||
Updated•14 years ago
|
Whiteboard: [wdc] → [wdc][needs tests]
Assignee | ||
Updated•14 years ago
|
Keywords: dev-doc-needed
![]() |
||
Comment 7•14 years ago
|
||
Dupping forward to bug with better patch.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Keywords: dev-doc-needed
Assignee | ||
Comment 8•14 years ago
|
||
Great, thanks.
You need to log in
before you can comment on or make changes to this bug.
Description
•