This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23398 - Define HTMLSelectElement.remove() (without argument) to do the same as ChildNode.remove()
Summary: Define HTMLSelectElement.remove() (without argument) to do the same as ChildN...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Edward O'Connor
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on: 20720
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-30 18:12 UTC by Edward O'Connor
Modified: 2013-09-30 18:15 UTC (History)
11 users (show)

See Also:


Attachments

Description Edward O'Connor 2013-09-30 18:12:35 UTC
+++ This bug was initially created as a clone of Bug #20720 +++

The remove() method from Interface Element [ http://www.w3.org/TR/dom/#dom-childnode-remove ] is overwritten with The remove() method from Interface HTMLSelectElement [ http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-33404570 ] for the select nodes.
Today, I have to use something like this:
window.HTMLSelectElement && function(HTMLSelectElementPrototype)
{
    var removeOption = HTMLSelectElementPrototype.remove;

    HTMLSelectElementPrototype.remove = function()
    {
        if (arguments[0] >= 0) removeOption.call(this, arguments[0]);
        else this.parentNode && this.parentNode.removeChild(this);
    };
}(window.HTMLSelectElement.prototype);

It would be better to change HTMLSelectElement Interface so that without arguments it used remove method like Element Interface.
Comment 1 Edward O'Connor 2013-09-30 18:15:29 UTC
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: 8441d7e
Rationale: Adopted fix in WHATWG r8192.