Skip to content
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 spec for _unfencedTop navigation target. #200

Merged
merged 6 commits into from
Nov 21, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/
text: iframe sandboxing flag set; url: iframe-sandboxing-flag-set
for: cross-origin opener policy enforcement result
text: needs a browsing context group switch; url: coop-enforcement-bcg-switch
urlPrefix: document-sequences.html
text: valid navigable target name or keyword; url: valid-navigable-target-name-or-keyword
text: the rules for choosing a navigable; url: the-rules-for-choosing-a-navigable
urlPrefix: dom.html
text: categories; url: concept-element-categories
text: contexts in which this element can be used; url: concept-element-contexts
Expand Down Expand Up @@ -3309,6 +3312,64 @@ left over to be leaked to the next {{Document}}.
mind, and could evolve in ways that give this specification unwanted side-effects.
</div>

<h4 id=unfenced-top-navigation-target>The "<code>_unfencedTop</code>" navigation target</h4>

Fenced frames use an additional reserved navigation target "<code>_unfencedTop</code>" to navigate.
This section patches the relevant portions of the [[HTML]] spec to add <code>_unfencedTop</code>.
VergeA marked this conversation as resolved.
Show resolved Hide resolved

VergeA marked this conversation as resolved.
Show resolved Hide resolved
Extend [=valid navigable target name or keyword=] to include a new keyword named <code>_unfencedTop
VergeA marked this conversation as resolved.
Show resolved Hide resolved
</code>.

In the following paragraph, change "top" to refer to the [=navigable/traversable navigable=] of the
VergeA marked this conversation as resolved.
Show resolved Hide resolved
[=navigable=] that the link or script is in. Add an additional clause to the same sentence that
reads: "outermost top" is the [=top-level traversable=] of the [=navigable=] that the link or
script is in.

Note: This change is necessary because this spec adds a distinction between [=navigable/traversable
navigable=] and [=top-level traversable=], which were previously functionally equivalent.

In the table below, add a column named "Effect in a fenced frame". The value for all rows in
VergeA marked this conversation as resolved.
Show resolved Hide resolved
this column is the same as "ordinary effect". Then, add two rows which read:

<table>
<thead>
<tr>
<th rowspan=2>Keyword</th>
<th rowspan=2>Ordinary effect</th>
<th colspan=2>Effect in an <code>iframe</code> with...</th>
VergeA marked this conversation as resolved.
Show resolved Hide resolved
<th rowspan=2>Effect in a fenced frame</th>
</tr>
<tr>
<th><code data-x="">sandbox=""</code></th>
<th><code data-x="">sandbox="allow-top-navigation"</code></th>
</tr>
</thead>

<tbody>
<tr>
<td><code>_unfencedTop</code> if outermost top is current</td>
<td>current</td>
<td>current</td>
<td>current</td>
<td>current</td>
</tr>
<tr>
<td><code>_unfencedTop</code> if outermost top is not current</td>
<td>outermost top</td>
<td>none</td>
<td>outermost top</td>
<td>outermost top</td>
</tr>
</tbody>
</table>

Add an extra step to [=the rules for choosing a navigable=] between the current steps 6 and 7, that
VergeA marked this conversation as resolved.
Show resolved Hide resolved
reads:

6.5. Otherwise, if name is an ASCII case-insensitive match for "_unfencedTop" and
|currentNavigable|'s [=navigable/traversable navigable=] is a [=fenced navigable container/fenced
navigable=], set <var ignore=''>chosen</var> to |currentNavigable|'s [=top-level traversable=].

<h3 id=page-visibility>Page visibility</h3>

The <a href=https://html.spec.whatwg.org/#page-visibility>Page visibility</a> section of [[HTML]] is
Expand Down
Loading