According to the DOM spec, both the "text" and "index" attributes of the HTMLOptionElement should be readonly (http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-70901257). We currently allow setting for both, but throw an exception when setting the "index" element.
One issue may be that the DOM Level 1 (Version 1.0) spec says that the "index" element shouldn't be readonly, and that fact is noted in the IDL with a FIXME that states, "FIXME: We disallow setting in violation of DOM 1 HTML".
Created attachment 16913 [details]
HTMLOptionElement.index is read-only in IE and DOM (both DOM 2 and DOM 1 Second Edition), so if I'm not missing something, Firefox is wrong to raise an exception.
HTMLOptionElement.text is settable in both IE and Firefox, so I don't think that we should change this.
Comment on attachment 16913 [details]
Why not add a newline at the end of the test file?
Shouldn't you also remove HTMLOptionElement::setIndex from HTMLOptionElement.cpp/h?
(In reply to comment #2)
> Why not add a newline at the end of the test file?
> Shouldn't you also remove HTMLOptionElement::setIndex from
> Otherwise, r=me
Committed revision 27217.