Closed Bug 903243 Opened 11 years ago Closed 11 years ago

No way to include root element in element.getElementsByTagName

Categories

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

24 Branch
Other
Other
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: pjs.nl, Unassigned)

Details

User Agent: Mozilla/5.0 (masking-agent; rv:17.0) Gecko/17.0 Firefox/17.0 (Nightly/Aurora)
Build ID: 20130804004006

Steps to reproduce:

It is not possible to get a list of elements with a certain tag name that potentially includes the root element. To be able to apply a certain amount of code to the top element as well, additional functions often need to be defined.


Actual results:

The resulting additional function calls lead to slower code. Apparently, optimized JS interpreters are useless as long as the DOM remains a bunch of ****.


Expected results:

The DOM function element.getElementsByTagName should be extended with a parameter 'includeRoot'. (Please do not inform me that www.w3.org does not specify this - the point is that they should have. Please also do not refer me to more recent DOM functions that are slower still).
document.getElementsByTagName exists and works fine.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.