Element.remove() is unsupported in Internet Explorer
See original GitHub issueWhile testing 8.0-beta in IE11 I’ve run into a problem in unmountComponent()
calling .remove()
on base
:
https://github.com/developit/preact/blob/8/src/vdom/component.js#L266
Changing that line to:
base.parentNode.removeChild(base);
…fixes the problem. I’m not sure if 8.0 is supposed to support IE, but worth keeping in mind.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
remove() not working in Internet Explorer - Stack Overflow
remove is not supported by ie. You would have to get the parent and call removeChild var node = document.getElementsByClassName('info')[i]; ...
Read more >Element.remove() - Web APIs - MDN Web Docs
Element.remove() is unscopable. The remove() method is not scoped into the with statement. See Symbol.unscopables for more information.
Read more >Fix site display issues with Compatibility View in Internet ...
You can turn it off by removing the site from your compatibility list. Not all website display problems are caused by browser incompatibility....
Read more >"remove" | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end ... DOM node method to remove the node itself from the...
Read more >internet explorer remove element from dom - Tips &Tricks
To use the functionality of childNode.remove() API on internet explorer, you have to use the following polyfill: ( arr => { arr.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m pretty sure IE8 never was supported by Preact. React does support it though.
If anyone’s trying to work around this problem, you can apply a minimum polyfill for the required methods: