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)

x86
Windows NT
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: taras.tielkes, Assigned: jst)

References

Details

(Whiteboard: [nsbeta2+])

Attachments

(1 file)

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)
Nominating for beta2, I'll have a look.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: nsbeta2
This is needed for beta2, and should be pretty easy; giving PDT approval.
Whiteboard: [nsbeta2+]
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
Mass update of qa contact
QA Contact: gerardok → janc
QA contact Update
QA Contact: janc → desale
VERIFIED invalid
Status: RESOLVED → VERIFIED
Summary: Setting OPTION element text using setAttribute fails → setAttribute and getAttribute fail on OPTION element text
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: