webcomponents / polyfills

Web Components Polyfills
BSD 3-Clause "New" or "Revised" License
1.13k stars 165 forks source link

MutationObserver shadow-dom show NotFoundError in IE11 #504

Open zhoukekestar opened 2 years ago

zhoukekestar commented 2 years ago

Description

See the example.

Example


<script src="https://gw.alipayobjects.com/os/lib/webcomponents/webcomponentsjs/2.6.0/webcomponents-bundle.js"></script>

<div id="shadowHost"></div>
<script>
  shadowHost.attachShadow({mode:'open'}).innerHTML = '<div></div>';

  (new MutationObserver(function (mutationsList) {
    console.info('mutated');
  })).observe(shadowHost.shadowRoot, { childList: true });

  shadowHost.shadowRoot.appendChild(document.createElement('div'));

</script>

Steps to reproduce

see the example

Expected behavior

No Error

Actual behavior

NotFoundError

Version

@webcomponents/webcomponentsjs@2.6.0

Browsers affected

zhoukekestar commented 2 years ago

image

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.