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

[email protected]
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]/Bugs/Public/>
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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected], [email protected],
                    [email protected], [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected],
                    [email protected], [email protected]
        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 on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.