Closed hadriann closed 3 years ago
When element
is a direct child of a shadow root, element.parentElement
returns null
instead of the parent shadow root. In this case, element.parentNode
returns the actual parent shadow root, and element.parentNode.host
returns the host element of that shadow root - i.e. the desired behavior for traversing up the DOM tree.
Fix for issue #189 - allow DOM traversal in shadow DOM contexts.