Skip to content

Commit f1bda7a

Browse files
committed
Use document instead of {{Document}}
1 parent 272b679 commit f1bda7a

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

fetch.bs

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,7 @@ a <a for=/>list</a> of <a data-lt="deferred fetch record">deferred fetch records
27512751
<hr>
27522752

27532753
<p>A <dfn>deferred fetch record</dfn> is a <a for=/>struct</a> used to maintain state needed
2754-
to invoke a fetch at a later time, e.g., when a {{Document}} object is unloaded or becomes
2754+
to invoke a fetch at a later time, e.g., when a document is unloaded or becomes
27552755
not <a for=Document>fully active</a>. It has the following <a for=struct>items</a>:
27562756

27572757
<dl>
@@ -6755,8 +6755,8 @@ agent's <a>CORS-preflight cache</a> for which there is a <a>cache entry match</a
67556755

67566756
<h3 id=deferred-fetch>Deferred fetching</h3>
67576757

6758-
<p>Deferred fetching allows callers to request that a fetch is invoked at the latest possible moment,
6759-
i.e., when a <a>fetch group</a> is <a for="fetch group">terminated</a>, or after a timeout.
6758+
<p>Deferred fetching allows callers to request that a fetch is invoked at the latest possible
6759+
moment, i.e., when a <a>fetch group</a> is <a for="fetch group">terminated</a>, or after a timeout.
67606760

67616761
<p>The <dfn>deferred fetch task source</dfn> is a <a>task source</a> used to update the result of a
67626762
deferred fetch. User agents must prioritize tasks in this <a>task source</a> before other task
@@ -6796,7 +6796,7 @@ which is an algorithm that takes no arguments:
67966796

67976797
<li><p>The user agent has a reason to believe that it is about to lose the opportunity to
67986798
execute scripts, e.g., when the browser is moved to the background, or when
6799-
<var>request</var>'s <a for=request>client</a> is a {{Document}} that had a
6799+
<var>request</var>'s <a for=request>client</a> is a <a for=/>document</a> that had a
68006800
"<code>hidden</code>" <a for=Document>visibility state</a> for a long period of time.
68016801
</ul>
68026802

@@ -6864,29 +6864,29 @@ which is an algorithm that takes no arguments:
68646864
<p><em>This section is non-normative.</em>
68656865

68666866
<p>The deferred-fetch quota is allocated to a <a for=/>top-level traversable</a> (a "tab"),
6867-
amounting to 640 kibibytes. The top-level document and its same-origin directly nested documents
6868-
can use this quota to queue deferred fetches, or delegate some of it to cross-origin nested
6869-
documents, using permissions policy.
6867+
amounting to 640 kibibytes. The top-level document and its same-origin directly nested documents can
6868+
use this quota to queue deferred fetches, or delegate some of it to cross-origin nested documents,
6869+
using permissions policy.
68706870

68716871
<p>By default, 128 kibibytes out of these 640 kibibytes are allocated to delegating the quota to
68726872
cross-origin nested documents, each reserving 8 kibibytes.
68736873

6874-
<p>The top-level {{Document}}, and subsequently its nested documents, can control how much of their
6875-
quota is delegates to cross-origin child documents, using permissions policy. By default,
6874+
<p>The top-level <a for=/>document</a>, and subsequently its nested documents, can control how much
6875+
of their quota is delegates to cross-origin child documents, using permissions policy. By default,
68766876
the "{{PermissionsPolicy/deferred-fetch-minimal}}" policy is enabled for any origin, while
6877-
"{{PermissionsPolicy/deferred-fetch}}" is enabled for the top-level document's origin only.
6878-
By relaxing the "{{PermissionsPolicy/deferred-fetch}}" policy for particular origins and nested
6877+
"{{PermissionsPolicy/deferred-fetch}}" is enabled for the top-level document's origin only. By
6878+
relaxing the "{{PermissionsPolicy/deferred-fetch}}" policy for particular origins and nested
68796879
documents, the top-level document can allocate 64 kibibytes to those nested documents. Similarly, by
68806880
restricting the "{{PermissionsPolicy/deferred-fetch-minimal}}" policy for a particular origin or
68816881
nested document, the document can prevent the document from reserving the 8 kibibytes it would
68826882
receive by default. By disabling the "{{PermissionsPolicy/deferred-fetch-minimal}}" policy for the
68836883
top-level document itself, the entire 128 kibibytes delegated quota is collected back into the main
68846884
pool of 640 kibibytes.
68856885

6886-
<p>Out of the allocated quota for a {{Document}}, only 64 kibibytes can be used concurrently for the
6887-
same reporting origin (the <a for=/>request</a>'s <a for=request>URL</a>'s <a for=url>origin</a>).
6888-
This prevents a situation where particular 3rd party libraries would reserve quota
6889-
opportunistically, before they have data to send.
6886+
<p>Out of the allocated quota for a <a for=/>document</a>, only 64 kibibytes can be used
6887+
concurrently for the same reporting origin (the <a for=/>request</a>'s <a for=request>URL</a>'
6888+
<a for=url>origin</a>). This prevents a situation where particular 3rd party libraries would reserve
6889+
quota opportunistically, before they have data to send.
68906890

68916891
<div class=example id=deferred-fetch-quota-examples>
68926892
<p>Any of the following calls to <a method><code>fetchLater()</code></a> would throw due to
@@ -6927,7 +6927,7 @@ calls would succeed and the last one would throw.
69276927
</code></pre>
69286928

69296929

6930-
<p>To make the previous example not throw, the top-level {{Document}} can delegate some of its quota
6930+
<p>To make the previous example not throw, the top-level document can delegate some of its quota
69316931
to <code>https://frame.example.com</code>, for example by serving the following header:
69326932
<pre><code class=lang-http>Permissions-Policy: deferred-fetch=(self "https://frame.example.com")</code></pre>
69336933

@@ -6991,7 +6991,7 @@ descendants share a quota of 384 kibibytes. That value is computed as such:
69916991
<li><code>https://ok.example.com/back</code> did not reserve 64 kibibytes, because it navigated
69926992
back to <a for=/>top-level traversable</a>'s origin.
69936993

6994-
<li><p>640 - 128 - 64 - 64 = 384 kibibytes.
6994+
<li><p>640 &minus; 128 &minus; 64 &minus; 64 = 384 kibibytes.
69956995
</ul>
69966996
</div>
69976997

@@ -7007,7 +7007,7 @@ descendants share a quota of 384 kibibytes. That value is computed as such:
70077007
<p>The <dfn>quota reserved for <code>deferred-fetch-minimal</code></dfn> is 128 kibibytes.
70087008

70097009
<div algorithm>
7010-
<p>To get the <dfn>available deferred-fetch quota</dfn> given a {{Document}}
7010+
<p>To get the <dfn>available deferred-fetch quota</dfn> given a <a for=/>document</a>
70117011
<var>document</var> and an <a for=/>origin</a>-or-null <var>origin</var>:
70127012

70137013
<ol>
@@ -7150,26 +7150,28 @@ the document ends up being <a>same origin</a> with its parent, the quota would b
71507150
</div>
71517151

71527152
<div algorithm>
7153-
<p>To <dfn export>potentially free deferred-fetch quota</dfn> for a {{Document}}
7153+
<p>To <dfn export>potentially free deferred-fetch quota</dfn> for a <a for=/>document</a>
71547154
<var>document</var>, if <var>document</var>'s <a>node navigable</a>'s <a>container document</a> is
71557155
not null, and its <a for=Document>origin</a> is <a>same origin</a> with <var>document</var>, then
71567156
set <var>document</var>'s <a>node navigable</a>'s <a>navigable container</a>'s
71577157
<a>reserved deferred-fetch quota</a> to 0.
71587158

7159-
<p class=note>This is called when a {{Document}} is created. It ensures that same-origin nested
7159+
<p class=note>This is called when a is created. It ensures that same-origin nested
71607160
documents don't reserve quota, as they anyway share their parent quota. It can only be called upon
7161-
document creation, as the <a for=Document>origin</a> of the {{Document}} is only known after
7162-
redirects are handled.
7161+
document creation, as the <a for=Document>origin</a> of the <a for=/>document</a> is only known
7162+
after redirects are handled.
71637163
</div>
71647164

71657165
<div algorithm>
7166-
<p>To get the <dfn>deferred-fetch control document</dfn> of a {{Document}} <var>document</var>:
7166+
<p>To get the <dfn>deferred-fetch control document</dfn> of a <a for=/>document</a>
7167+
<var>document</var>:
71677168

71687169
<ol>
71697170
<li><p>If <var>document</var>' <a>node navigable</a>'s <a>container document</a> is null or a
7170-
{{Document}} whose <a for=Document>origin</a> is not <a>same origin</a> with <var>document</var>,
7171-
return <var>document</var>; Otherwise return the <a>deferred-fetch control document</a> given
7172-
<var>document</var>' <a>node navigable</a>'s <a>container document</a>.
7171+
<a for=/>document</a> whose <a for=Document>origin</a> is not <a>same origin</a> with
7172+
<var>document</var>, return <var>document</var>; Otherwise return the
7173+
<a>deferred-fetch control document</a> given <var>document</var>' <a>node navigable</a>'s
7174+
<a>container document</a>.
71737175
</ol>
71747176
</div>
71757177

@@ -9052,8 +9054,8 @@ with a <var>promise</var>, <var>request</var>, <var>responseObject</var>, and an
90529054
which is an algorithm returning a boolean.
90539055

90549056
<div algorithm>
9055-
<p>The <dfn attribute for=FetchLaterResult><code>activated</code></dfn> getter steps are to return the result of running
9056-
<a>this</a>'s <a for=FetchLaterResult>activated getter steps</a>.
9057+
<p>The <dfn attribute for=FetchLaterResult><code>activated</code></dfn> getter steps are to return
9058+
the result of running <a>this</a>'s <a for=FetchLaterResult>activated getter steps</a>.
90579059
</div>
90589060

90599061
<div algorithm="dom-fetch-later">
@@ -9079,7 +9081,7 @@ method steps are:
90799081
<li><p>If <var>activateAfter</var> is less than 0, then throw a {{RangeError}}.
90809082

90819083
<li><p>If <var>request</var>'s <a for=request>client</a> is not a <a>fully active</a>
9082-
{{Document}}, then throw a {{TypeError}}.
9084+
<a for=/>document</a>, then throw a {{TypeError}}.
90839085

90849086
<li><p>If <var>request</var>'s <a for=request>URL</a>'s <a for=url>scheme</a> is not an
90859087
<a>HTTP(S) scheme</a>, then throw a {{TypeError}}.

0 commit comments

Comments
 (0)