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 all 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
72 changes: 72 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,75 @@ 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 support for this new
reserved keyword.

<div algorithm="unfenced-top-keyword">
Modify [=valid navigable target name or keyword=] to include a new keyword named
"<code>_unfencedTop</code>".

Modify the below paragraph to replace the following text:

* "top" means the [=top-level traversable=] of the [=navigable=] that the link or script is in,

with:

* "top" means the [=navigable/traversable navigable=] of the [=navigable=] that the link or
script is in, "outermost top" means 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 existing
rows in 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>
<th rowspan=2>Effect in a <code>fencedframe</code>></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>new</td>
<td>maybe new</td>
<td>maybe new</td>
<td>current</td>
</tr>
<tr>
<td><code>_unfencedTop</code> if outermost top is not current</td>
<td>new</td>
<td>maybe new</td>
<td>maybe new</td>
<td>outermost top</td>
</tr>
</tbody>
</table>
</div>

<div algorithm="unfenced-top-rules">
Add an extra step to [=the rules for choosing a navigable=] between the current steps 6 and 7,
that reads:

6.5. Otherwise, if name is an ASCII case-insensitive match for <code>"_unfencedTop"</code> and
|currentNavigable|'s [=navigable/traversable navigable=] is a [=fenced navigable container/fenced
navigable=], set <var ignore=''>chosen</var> to |currentNavigable|'s [=top-level traversable=].
domfarolino marked this conversation as resolved.
Show resolved Hide resolved
</div>

<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