New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: children and childNodes not returning top-level slotted children #4098
Changes from 2 commits
9843b5a
6166bbe
316f47a
f902276
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,8 @@ export function getNodeNearestOwnerKey(node: Node): number | undefined { | |
} | ||
host = parentNodeGetter.call(host) as ShadowedNode | null; | ||
|
||
// Elements slotted from top level light DOM into synthetic shadow | ||
// reach the slot tag from the shadow element first | ||
Comment on lines
+61
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't understand this comment. Are we short-circuiting here so that we don't need to traverse to the root? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
if (!isNull(host) && isSyntheticSlotElement(host)) { | ||
return undefined; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also applies to root shadow DOM components: