Closed Bug 11000 Opened 25 years ago Closed 25 years ago

getElementsByTagName(someHTMLelement) returns nothing in XUL docs

Categories

(Core :: XUL, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: bugs, Assigned: waterson)

Details

in a XUL document (file URLs are below, they're a modified editor image
properties dialog) getElementsByTagName() returns a zero length collection for
any HTML tag argument, e.g. document.getElementsByTagName("input"); even if
there are input elements in the doc.

for XUL elements (e.g document.getElementsByTagName("titledbutton")) it returns
a full collection correctly.

Files:
(in function DLGrabInputs())
http://homepages.ihug.co.nz/~rgoodger/lizard/EdImageProps.js
http://homepages.ihug.co.nz/~rgoodger/lizard/EdImageProps.xul
to see the problem in action, put these in chrome://editor/content/default and
load editor, then click the "image" button on the toolbar, and watch the
console.
I updated the files somewhat. Now, when loaded, the script does not recognise
any HTML elements (giving an error relating to a TR element that's not been
grabbed properly - <TR ID="AdvancedRow">..).. while the XUL titledbutton
called "Advanced" responds to script as expected (goes in and out of pressed
state when clicked).
Status: NEW → ASSIGNED
Target Milestone: M9
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
HTML elements _always_ return their tag names as UPPERCASE. So, changing your
code to look for upper case HTML tags (e.g., "INPUT", "BUTTON") should allow
you to work around this problem.

I'm loathe to put case-insensitive compares in the XUL document's
implementation of getElementsByTagName(), as it would preclude us from
differentiating between case-sensitive XML tags. DOM Level 1 (sec 1.1.6) seems
to indicate that we are doing the right thing here.

Marking INVALID for now; hyatt, rgoodger, re-open if you find evidence that
indicates that this should be otherwise. (Hyatt, we should add this to the XUL
FAQ, I think...)
Assigning to originator per new organizational structure.
QA Contact: ckritzer → hyatt
QA Contact: hyatt → ckritzer
Changing QA Contact back to ckritzer@netscape.com
Status: RESOLVED → VERIFIED
Marking VERIFIED INVALID per waterson's comments.
BULK MOVE: Changing component from XUL to XP Toolkit/Widgets: XUL.  XUL 
component will be deleted.
Component: XUL → XP Toolkit/Widgets: XUL
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: ckritzer → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.