Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add shadow root support for isInDOM function #72313
I was trying to use Monaco Editor from within a web component with a shadow root, and the isInDOM check would fail and the editor wouldn't be rendered. It's because the parent of a shadow root node is found in the "host" property, and not "parentNode". This fix makes sure the isInDOM function can climb up the visual tree until it reaches the body node, even when there are shadow roots in the page.