回答編集履歴
1
remove の存在判定アルゴリズムを変更
answer
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
- [ChildNode.remove() - Web API インターフェイス | MDN](https://developer.mozilla.org/ja/docs/Web/API/ChildNode/remove)
|
16
16
|
|
17
17
|
```JavaScript
|
18
|
-
if (typeof Element === 'function' && !('remove' in
|
18
|
+
if (typeof Element === 'function' && !('remove' in document.createElement('p'))) { // IE11- 用の Polyfill
|
19
19
|
Element.prototype.remove = function remove () {
|
20
20
|
if (this.parentNode) {
|
21
21
|
this.parentNode.removeChild(this);
|