Closed Bug 312427 Opened 19 years ago Closed 18 years ago

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

Categories

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

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 14869

People

(Reporter: jym, Unassigned)

Details

Attachments

(1 file)

400 bytes, application/vnd.mozilla.xul+xml
Details
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.
See bug 14869 and bug 300519.
Assignee: nobody → general
Component: General → DOM: HTML
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Attached file testcase
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
Closed: 18 years ago
Resolution: --- → DUPLICATE
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.

Attachment

General

Creator:
Created:
Updated:
Size: