[Bug 23398] New: Define HTMLSelectElement.remove() (without argument) to do the same as ChildNode.remove()

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23398

            Bug ID: 23398
           Summary: Define HTMLSelectElement.remove() (without argument)
                    to do the same as ChildNode.remove()
           Product: HTML WG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec
          Assignee: dave.null@w3.org
          Reporter: eoconnor@apple.com
        QA Contact: public-html-bugzilla@w3.org
                CC: arv@chromium.org, bzbarsky@mit.edu, cam@mcc.id.au,
                    ian@hixie.ch, killxxxvi@gmail.com, mike@w3.org,
                    Ms2ger@gmail.com, public-html-admin@w3.org,
                    public-html-wg-issue-tracking@w3.org,
                    syoichi@outlook.com, www-dom@w3.org
        Depends on: 20720

+++ 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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 30 September 2013 18:12:41 UTC