'Mutation observer not being called when there's a change in Shadow Dom tree

i have a running extension where i use combination of mutation observer and tree walker to filter out text nodes and embed React component on that page where i have text instances on the page. My problem is with the current state of functionality my extension doesn't work on website which have shadow dom in the page(doesn't filter out text nodes there). I did some investigation to see the problem, first i did some debugging at tree walker level in filtering nodes after some more debugging it turns out my mutation observer is also not firing when there's a change in shadow tree. i can't find much resources on this topic and i would like to know is it limitation of mutation observer to not detect changes inside nested shadow dom nodes?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source