Closed
Bug 39611
Opened 25 years ago
Closed 25 years ago
setAttribute and getAttribute fail on OPTION element text
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: taras.tielkes, Assigned: jst)
References
Details
(Whiteboard: [nsbeta2+])
Attachments
(1 file)
733 bytes,
text/html
|
Details |
1. create a new OPTION element.
2. set text attribute using setAttribute(key,val).
3. add this new OPTION to a SELECT element.
RESULT: empty option (the "text" doesn't show).
Attached example works in IE5 (par HtmlSelectElement::add parameter diffrence)
Reporter | ||
Comment 1•25 years ago
|
||
Assignee | ||
Comment 2•25 years ago
|
||
Nominating for beta2, I'll have a look.
This is needed for beta2, and should be pretty easy; giving PDT approval.
Whiteboard: [nsbeta2+]
Comment 4•25 years ago
|
||
Well...this isn't quite right - "text" is not an attribute of the HTML OPTION
element. The readonly text property listed in the HTMLOptionElement interface is
just a convenience for getting the option text contents. The core methods
get/setAttribute() are used specificaly to set element attributes.
Unfortunately, there isn't an existing convenience property for setting the text
contents (we should consider adding one). For the time being, your only option
is to get the child Text node and modify its data.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Summary: Setting OPTION element text using setAttribute fails → setAttribute and getAttribute fail on OPTION element text
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•