https://github.com/javan/mutation-observer-inner-html-shim
https://github.com/javan/mutation-observer-inner-html-shim
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/javan/mutation-observer-inner-html-shim
- Owner: javan
- License: mit
- Created: 2018-03-26T18:32:38.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2021-01-20T18:20:25.000Z (almost 5 years ago)
- Last Synced: 2025-03-25T10:37:30.771Z (9 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/mutation-observer-inner-html-shim
- Size: 96.7 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
In IE 11, nodes in `MutationRecord.removedNodes` are always empty when they're removed by setting `innerHTML`. This shim works around the issue by patching `HTMLElement.innerHTML` to remove each child node individually before setting the new value.
References:
* https://connect.microsoft.com/IE/feedback/details/817132/ie-11-childnodes-are-missing-from-mutationobserver-mutations-removednodes-after-setting-innerhtml
* https://github.com/WebReflection/document-register-element/issues/101
* https://github.com/skatejs/skatejs/issues/85