We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
HTMLSelectElement#remove
Element#remove
1 parent ded0dde commit 7240a87Copy full SHA for 7240a87
src/prototype/dom/dom.js
@@ -472,6 +472,15 @@
472
* <li id="mcintosh">McIntosh</li>
473
* <li id="ida-red">Ida Red</li>
474
* </ul>
475
+ *
476
+ * ##### Warning
477
478
+ * Using [[Element.remove]] as an instance method (e.g.,
479
+ * `$('foo').remove('')`) won't work when the element in question is a
480
+ * `select` element, since`select` elements have [an existing `remove` method](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement)
481
+ * that behaves differently from this method. As a workaround, use the
482
+ * generic version instead (`Element.remove('foo')`).
483
484
**/
485
function remove(element) {
486
element = $(element);
0 commit comments