You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The {{NavigationPreloadManager/enable()}} method, when invoked, *must* return a new [=promise=] |promise| and run the following steps [=in parallel=]:
768
+
The <dfn method for="NavigationPreloadManager"><code>enable()</code></dfn> method, when invoked, *must* return a new [=promise=] |promise| and run the following steps [=in parallel=]:
769
769
770
770
1. Let |registration| be the [=context object=]'s associated [=/service worker registration=].
771
771
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" exception, and abort these steps.
772
772
1. Set |registration|'s [=navigation preload enabled flag=].
The {{NavigationPreloadManager/disable()}} method, when invoked, *must* return a new [=promise=] |promise| and run the following steps [=in parallel=]:
779
+
The <dfn method for="NavigationPreloadManager"><code>disable()</code></dfn> method, when invoked, *must* return a new [=promise=] |promise| and run the following steps [=in parallel=]:
780
780
781
781
1. Let |registration| be the [=context object=]'s associated [=/service worker registration=].
782
782
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" exception, and abort these steps.
The <a method for="NavigationPreloadManager"><code>setHeaderValue(|value|)</code></a> method, when invoked, *must* return [=a new promise=] |promise| and run the following steps [=in parallel=]:
790
+
The <dfn method for="NavigationPreloadManager"><code>setHeaderValue(|value|)</code></dfn> method, when invoked, *must* return [=a new promise=] |promise| and run the following steps [=in parallel=]:
791
791
792
792
1. Let |registration| be the [=context object=]'s associated [=/service worker registration=].
793
793
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" exception, and abort these steps.
794
794
1. Set |registration|'s [=navigation preload header value=] to |value|.
The {{NavigationPreloadManager/getState()}} method, when invoked, *must* return [=a new promise=] |promise| and run the following steps [=in parallel=]:
801
+
The <dfn method for="NavigationPreloadManager"><code>getState()</code></dfn> method, when invoked, *must* return [=a new promise=] |promise| and run the following steps [=in parallel=]:
802
802
803
803
1. Let |registration| be the [=context object=]'s associated [=/service worker registration=].
804
804
1. Let |state| be a new {{NavigationPreloadState}} dictionary.
1. If |request| is a [=navigation request=] and |registration|'s [=navigation preload enabled flag=] is set, and |request|'s [=request/method=] is \`<code>GET</code>\`, then:
2888
2888
1. Let |preloadRequest| be the result of [=request/cloning=] the request |request|.
2889
2889
1. Let |preloadRequestHeaders| be |preloadRequest|'s [=request/header list=].
2890
-
1. Let |preloadResponseObject| be a new {{Response}} object and a new associated{{Headers}} object whose [=guard=] is "`immutable`".
2890
+
1. Let |preloadResponseObject| be a new {{Response}} object associated with a new {{Headers}} object whose [=guard=] is "`immutable`".
2891
2891
1. [=header list/Append=] to |preloadRequestHeaders| a new [=header=] whose [=header/name=] is \`<code>Service-Worker-Navigation-Preload</code>\` and [=header/value=] is |registration|'s [=navigation preload header value=].
2892
2892
1. Set |preloadRequest|'s [=skip-service-worker flag=].
The authors would also like to thank Dimitri Glazkov for his scripts and formatting tools which have been essential in the production of this specification. The authors are also grateful for his considerable guidance.
3559
3559
3560
3560
Thanks also to Vivian Cromwell, Greg Simon, Alex Komoroske, Wonsuk Lee, and Seojin Kim for their considerable professional support.
0 commit comments