Geeks

javan/mutation-observer-inner-html-shim

Primary LanguageJavaScriptMIT LicenseMIT

  • mutation-observer-inner-html-shim Home Page
  • mutation-observer-inner-html-shim GitHub
  • MarkdownReadme
  • 0Issues
  • 8Stargazers
  • 4Watchers

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
  • WebReflection/document-register-element#101
  • skatejs/skatejs#85

Share to

Contact site admin: Geeks.