-
Notifications
You must be signed in to change notification settings - Fork 294
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
Add flat tree parent definition #1223
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
|
@@ -5956,6 +5956,23 @@ is an object or one of its <a>shadow-including ancestors</a>. | |
<p class=note>The <a>retargeting</a> algorithm is used by <a lt=dispatch>event dispatch</a> as well | ||
as other specifications, such as <cite>Fullscreen</cite>. [[FULLSCREEN]] | ||
|
||
<p>To get the <dfn export>flat tree parent</dfn> of a <var>node</var>:</p> | ||
|
||
<ol> | ||
<li><p>Let <var>parent</var> be <var>node</var>'s <a for=tree>parent</a>.</p></li> | ||
|
||
<li><p>If <var>parent</var> is a <a for=/>shadow root</a>, then return <var>parent</var>'s <a | ||
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. No wrapping in phrasing elements. |
||
for=DocumentFragment>host</a>.</p></li> | ||
|
||
<li><p>If <var>parent</var> is not a <a for=Element>shadow host</a>, then return | ||
<var>node</var>.</p></li> | ||
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. You want to return parent here, presumably. |
||
|
||
<li><p>If <var>node</var>'s <a for=slottable>assigned slot</a> is null, then return null.</p></li> | ||
|
||
<li><p>Return <var>node</var>'s <a for=slottable>assigned slot</a>'s <a | ||
for=tree>parent</a>.</p></li> | ||
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. @mfreed7 do I need to run anything recursive in the last step here? I briefly tried to make a demo with a slot assigned into another slot, but it didn't seem to work. 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 guess I at least need to check if the parent is a shadow host, right? |
||
</ol> | ||
|
||
|
||
<h3 id=interface-element>Interface {{Element}}</h3> | ||
|
||
|
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.
What about children of a slot element?