- From: <bugzilla@jessica.w3.org>
- Date: Mon, 21 Jan 2013 05:55:53 +0000
- To: www-dom@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720 Bug ID: 20720 Summary: The remove() method from Element Interface is overwritten in HTMLSelectElement Interface Classification: Unclassified Product: WebAppsWG Version: unspecified Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: DOM Assignee: annevk@annevk.nl Reporter: killxxxvi@gmail.com QA Contact: public-webapps-bugzilla@w3.org CC: mike@w3.org, www-dom@w3.org 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.
Received on Monday, 21 January 2013 05:55:54 UTC