Use shadowRoot.host as parent element if parent node is a shadow root