You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mutation Observer callback is not called when elements are added or removed from shadow host.
<divid="shadowHost"></div><script>shadowHost.attachShadow({mode:'open'}).innerHTML=`<div><slot></slot></div>`;varhostObserverCalled=false;(newMutationObserver((mutationsList)=>{console.info('mutated');hostObserverCalled=true;})).observe(shadowHost,{childList: true});shadowHost.appendChild(document.createElement('div'));setTimeout(()=>{console.assert(hostObserverCalled,'Shadow hot\s mutation observer callback should be eventually called.');},500);</script>
Attach mutation observer {childList: true} and observe the element.
Create div.
Append div to the element or remove existing element.
Expected Results
Mutation observer callback should get called
Actual Results
The callback is not called
Browsers Affected
Chrome
Firefox
Edge
[?] Safari 9
[?] Safari 8
IE 11
Versions
webcomponents: v2.0.2
The text was updated successfully, but these errors were encountered:
tomalec
changed the title
Muttion Observer callback is not called for shadow hosts
Mutation Observer callback is not called for shadow hosts
Jul 3, 2018
dfreedm
changed the title
Mutation Observer callback is not called for shadow hosts
[ShadyDOM] Mutation Observer callback is not called for shadow hosts
Jun 12, 2019
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.
This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!
Description
Mutation Observer callback is not called when elements are added or removed from shadow host.
Live Demo
https://glitch.com/edit/#!/mutationobserver-on-shadowhost?path=index.html:15:41
Steps to Reproduce
{childList: true}
and observe the element.div
.div
to the element or remove existing element.Expected Results
Mutation observer callback should get called
Actual Results
The callback is not called
Browsers Affected
Versions
The text was updated successfully, but these errors were encountered: