This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The spec currently says that if HTMLOptionsCollection.add() is passed something that isn't an HTMLOptionElement or HTMLOptGroupElement that the method does nothing. All browsers seems to throw, instead: http://people.mozilla.org/~cmccormack/tests/options-collection-add.html
And it seems like throwing an exception makes more sense... That way, debugging javascript code will be easier.
mass-move component to LC1
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Accepted Change Description: see diff given below Rationale: Concurred with reporter's comments. Fixed it with a WebIDL change. Note: I didn't test the second argument to see if it is type-checked also.
Checked in as WHATWG revision r6440. Check-in comment: closer to existing implementations http://html5.org/tools/web-apps-tracker?from=6439&to=6440