Closed Bug 93956 Opened 24 years ago Closed 23 years ago

[RFE] XUL should implement document.getElementsByName

Categories

(Core :: XUL, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED INVALID
Future

People

(Reporter: mikeypotter, Assigned: hyatt)

Details

Similar to HTML, XUL should implement the document.getElementsByName function which would return an array of XUL elements with that name.
reassigning to hyatt. We would need to define this function on nsIXULDocument and implement it...
Assignee: trudelle → hyatt
Keywords: oeone
XUL uses ID to identify elts, not name. I don't believe XUL should support this function.
I also am trying to avoid these functions, since the DOM is going to be specifying a more generic selector function (using XPath probably) that would be capable of doing all of these selections. Plus, XUL supports getElementsByAttribute, which can be used to do getElementsByName anyway.
You can do document.getElementsByAttribute( "name", nameofelements ) so I don't know if this is a bug but more of a feature request. getElementsByName should be added just to mirror the HTML dom.
Summary: XUL should implement document.getElementsByName → [RFE] XUL should implement document.getElementsByName
Severity: normal → enhancement
Dave: Based on your comments, feel free to mark this bug as invalid, since there is a valid work around for it. However, I also feel that Mozilla might want to implement this since it will help people coming over from DHTML. (Plus its really just a short cut to document.getElementsByAttribute( "name", etc...) Perhaps if this function is implemented, it could inform the user of the fact that name attributes are not really supported in XUL, either to the JS Console or to a terminal. Removing oeone keyword since this is not a blocker or an issue for us.
Keywords: oeone
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Target Milestone: --- → Future
invalid.
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.