getElementsByTagName in XUL returns an HTMLCollection object instead of a NodeList object

RESOLVED DUPLICATE of bug 14869

Status

()

RESOLVED DUPLICATE of bug 14869
13 years ago
10 years ago

People

(Reporter: jym, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

400 bytes, application/vnd.mozilla.xul+xml
Details
(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 Firefox/1.0.7
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 Firefox/1.0.7

When using the getElementsByTagName DOM method on an element belonging to an XML
document an HTMLCollection object is returned although the DOM specs require an
NodeList object.
Moreover, having prototyped the HTMLCollection object with some specifics, these
are not available from the returned HTMLCollection object.

Reproducible: Always

Steps to Reproduce:
1. Load an XUL document in the browser.
2. Run the debugger and stop somewhere in order to apply the
getElementsByTagName method.
3. Have a look at the returned object.

Actual Results:  
An HTMLCollection object is returned.

Expected Results:  
A NodeList object should have been returned.

Comment 1

13 years ago
See bug 14869 and bug 300519.

Updated

13 years ago
Assignee: nobody → general
Component: General → DOM: HTML
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk

Comment 2

13 years ago
Created attachment 199583 [details]
testcase

Updated

13 years ago
Summary: getElementsByTagName returns an HTMLCollection object instead of a NodeList object → getElementsByTagName in XUL returns an HTMLCollection object instead of a NodeList object
Note that prototypes and the DOM don't mix -- the DOM assumes multiple inheritance, which cannot happen with prototypes.

*** This bug has been marked as a duplicate of 14869 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE

Updated

10 years ago
Component: DOM: HTML → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.