Skip to content

Commit

Permalink
Add other spec integration notes for back/forward cache
Browse files Browse the repository at this point in the history
In particular, explain how other specifications should integrate with the "reactivating a document" and "unloading document cleanup steps" algorithms.

Fixes #8872.
  • Loading branch information
rakina committed Mar 24, 2023
1 parent c598ff0 commit e9bb6cf
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -94873,7 +94873,9 @@ location.href = '#foo';</code></pre>

<p class="note">This algorithm updates <var>document</var> after it has come out of <a
href="#note-bfcache">bfcache</a>, i.e., after it has been made <span>fully active</span>
again.</p>
again. Other specifications that want to watch for this change to the <span>fully
active</span> state are encouraged to add steps into this algorithm, so that the ordering
of events that happen in effect of the change is clear.</p>

<ol>
<li id="history-autocomplete"><p><span data-x="list iterate">For each</span>
Expand Down Expand Up @@ -96066,7 +96068,7 @@ new PaymentRequest(&hellip;); // Allowed to use
</ol>

<p>This specification defines the following <dfn export>unloading document cleanup steps</dfn>.
Other specifications can define more. Given a <code>Document</code> <var>document</var>:</p>
Other specifications can define more. Given a <code>Document</code> <var>document</var>:</p>

<ol>
<li><p>Let <var>window</var> be <var>document</var>'s <span>relevant global
Expand Down Expand Up @@ -96096,6 +96098,24 @@ new PaymentRequest(&hellip;); // Allowed to use
</li>
</ol>

<div class="XXX">
<p>It would be better if specification authors sent a pull request to add calls from here into
their specifications directly, instead of using the <span>unloading document cleanup
steps</span> hook, to ensure well-defined cross-specification call order. As of the time of this
writing the following specifications are known to have <span>unloading document cleanup
steps</span>, which will be run in an unspecified order: <cite>Fullscreen API</cite>, <cite>Web
NFC</cite>, <cite>WebDriver BiDi</cite>, <cite>Compute Pressure</cite>, <cite>File API</cite>,
<cite>Media Capture and Streams</cite>, <cite>Picture-in-Picture</cite>, <cite>Screen
Orientation</cite>, <cite>Service Workers</cite>, <cite>WebLocks API</cite>, <cite>WebAudio
API</cite>, <cite>WebRTC</cite>, <cite>WebTransport</cite>. <ref spec=FULLSCREEN> <ref
spec=WEBNFC> <ref spec=WEBDRIVERBIDI> <ref spec=COMPUTEPRESSURE> <ref spec=FILEAPI> <ref
spec=MEDIASTREAM> <ref spec=PICTUREINPICTURE> <ref spec=SCREENORIENTATION> <ref spec=SW> <ref
spec=WEBLOCKS> <ref spec=WEBAUDIO> <ref spec=WEBRTC> <ref spec=WEBTRANSPORT>

<p><a href="https://github.com/whatwg/html/issues/8906">Issue #8906</a> tracks the work to make
the order of these steps clear.</p>
</div>

<h4>Destroying documents</h4>

<p id="discard-a-document">To <dfn data-x="destroy a document">destroy</dfn> a
Expand Down Expand Up @@ -133098,6 +133118,9 @@ INSERT INTERFACES HERE
<dt id="refsCOMPUTABLE">[COMPUTABLE]</dt>
<dd>(Non-normative) <cite><a href="http://www.turingarchive.org/browse.php/B/12">On computable numbers, with an application to the Entscheidungsproblem</a></cite>, A. Turing. In <cite>Proceedings of the London Mathematical Society</cite>, series 2, volume 42, pages 230-265. London Mathematical Society, 1937.</dd>

<dt id="refsCOMPUTEPRESSURE">[COMPUTEPRESSURE]</dt>
<dd>(Non-normative) <cite><a href="https://w3c.github.io/compute-pressure/">Compute Pressure</a></cite>, K. Christiansen, A. Mandy. W3C.</dd>

<dt id="refsCONSOLE">[CONSOLE]</dt>
<dd><cite><a href="https://console.spec.whatwg.org/">Console</a></cite>, T. Stock, R. Kowalski, D. Farolino. WHATWG.</dd>

Expand Down Expand Up @@ -133429,6 +133452,9 @@ INSERT INTERFACES HERE
<dt id="refsPERMISSIONSPOLICY">[PERMISSIONSPOLICY]</dt>
<dd><cite><a href="https://w3c.github.io/webappsec-feature-policy/">Permissions Policy</a></cite>, I. Clelland, W3C.</dd>

<dt id="refsPICTUREINPICTURE">[PICTUREINPICTURE]</dt>
<dd>(Non-normative) <cite><a href="https://w3c.github.io/picture-in-picture/">Picture-in-Picture</a></cite>, F. Beaufort, M. Lamouri, W3C</dd>

<dt id="refsPINGBACK">[PINGBACK]</dt>
<dd><cite><a href="https://www.hixie.ch/specs/pingback/pingback">Pingback 1.0</a></cite>, S. Langridge, I. Hickson.</dd>

Expand Down Expand Up @@ -133626,15 +133652,24 @@ INSERT INTERFACES HERE
<dt id="refsWEBLINK">[WEBLINK]</dt>
<dd><cite><a href="https://httpwg.org/specs/rfc8288.html">Web Linking</a></cite>, M. Nottingham. IETF.</dd>

<dt id="refsWEBLOCKS">[WEBLOCKS]</dt>
<dd>(Non-normative) <cite><a href="https://w3c.github.io/web-locks/">Web Locks API</a></cite>, J. Bell, K. Rosylight. W3C.</dd>

<dt id="refsWEBMCG">[WEBMCG]</dt>
<dd><cite><a href="https://www.webmproject.org/docs/container/">WebM Container Guidelines</a></cite>. The WebM Project.</dd>

<dt id="refsWEBNFC">[WEBNFC]</dt>
<dd>(Non-normative) <cite><a href="https://w3c.github.io/web-nfc/">Web NFC</a></cite>, F. Beaufort, K. Christiansen, Z. Kis. W3C.</dd>

<dt id="refsWEBRTC">[WEBRTC]</dt>
<dd>(Non-normative) <cite><a href="https://w3c.github.io/webrtc-pc/">Web RTC</a></cite>, C. Jennings, F. Castelli, H. Boström, J. Bruaroey. W3C.</dd>

<dt id="refsWEBSOCKETS">[WEBSOCKETS]</dt>
<dd><cite><a href="https://websockets.spec.whatwg.org/">WebSockets</a></cite>, A. Rice. WHATWG.</dd>

<dt id="refsWEBTRANSPORT">[WEBTRANSPORT]</dt>
<dd>(Non-normative) <cite><a href="https://w3c.github.io/webtransport/">WebTransport</a></cite>, B. Aboba, N. Jaju, V. Vasiliev. W3C.</dd>

<dt id="refsWEBVTT">[WEBVTT]</dt>
<dd><cite><a href="https://w3c.github.io/webvtt/">WebVTT</a></cite>, S. Pieters. W3C.</dd>

Expand Down

0 comments on commit e9bb6cf

Please sign in to comment.