Skip to content

Commit 6aa42be

Browse files
committed
Fix a big pile of linking errors.
Though not all. See WICG#162 for the remaining ones.
1 parent 5697424 commit 6aa42be

File tree

1 file changed

+37
-35
lines changed

1 file changed

+37
-35
lines changed

index.bs

+37-35
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Indent: 2
1313
</pre>
1414

1515
<pre class="link-defaults">
16+
spec:html; type:dfn; for:agent; text:event loop
1617
spec:infra; type:dfn; text:list
17-
spec:fetch; type:interface; text:ReadableStream
18+
spec:service-workers; type:dfn; for:/; text:service worker
1819
spec:webidl; type:dfn; text:resolve
1920
</pre>
2021

@@ -83,7 +84,7 @@ This specification aims to:
8384

8485
# Realms # {#realms}
8586

86-
All platform objects are created in the [=context object=]'s [=relevant Realm=] unless otherwise specified.
87+
All platform objects are created in the [=this=]'s [=relevant Realm=] unless otherwise specified.
8788

8889
# Infrastructure # {#infrastructure}
8990

@@ -95,7 +96,7 @@ A resource is considered <dfn>temporarily unavailable</dfn> if the user agent be
9596
The <dfn>background fetch task source</dfn> is a [=task source=].
9697

9798
<div algorithm>
98-
To <dfn>queue a bgfetch task</dfn> on an optional |eventLoop| (an [=event loop=], defaulting to the caller's [=context object=]'s [=relevant settings object=]'s [=responsible event loop=]) with |steps| (steps), [=queue a task=] on |eventLoop| using the [=background fetch task source=] to run |steps|.
99+
To <dfn>queue a bgfetch task</dfn> on an optional |eventLoop| (an [=event loop=], defaulting to the caller's [=this=]'s [=relevant settings object=]'s [=responsible event loop=]) with |steps| (steps), [=queue a task=] on |eventLoop| using the [=background fetch task source=] to run |steps|.
99100
</div>
100101

101102
## Extensions to service worker registration ## {#service-worker-registration-concept-extensions}
@@ -150,7 +151,7 @@ A <dfn>background fetch</dfn> consists of:
150151
:: |icon|'s [=image resource/src=].
151152
: [=request/Client=]
152153
:: |environment|.
153-
: [=request/Keepalive flag=]
154+
: [=request/Keepalive|keepalive flag=] flag
154155
:: Set.
155156
: [=request/Service-workers mode=]
156157
:: "`none`".
@@ -278,7 +279,7 @@ Note: This algorithm manages the fetching of a [=/background fetch record=]. One
278279

279280
Note: At this point the request is entirely held in storage, even if it started as a stream.
280281

281-
1. Set |request|'s [=request/keepalive flag=].
282+
1. Set |request|'s [=request/keepalive|keepalive flag=].
282283
1. Set |request|'s [=request/service-workers mode=] to "`none`".
283284
1. Let |rangeStart| be the [=byte sequence/length=] of |responseData|'s [=background fetch response/bytes=].
284285
1. If |rangeStart| is not 0, then [=request/add a range header=] to |request| with |rangeStart|.
@@ -473,7 +474,8 @@ Note: This algorithm creates platform objects for [=background fetch records=].
473474
:: A new {{Headers}} object associated with this {{Request}}'s [=Request/request=]'s [=request/header list=].
474475
1. Set |recordObject|'s {{BackgroundFetchRecord/request}} to |requestObject|.
475476
1. Let |transmittedBytes| be 0.
476-
1. Let |stream| be [=construct a ReadableStream object|a new readable stream=] with a pull action that returns [=a new promise=] |promise| and runs these steps [=in parallel=]:
477+
1. Let |stream| be a [=new=] {{ReadableStream}}.
478+
1. [=ReadableStream/Set up=] |stream| given a pull action that returns [=a new promise=] |promise| and runs these steps [=in parallel=]:
477479
1. Wait for the [=byte sequence/length=] of |responseData|'s [=background fetch response/bytes=] to be greater than |transmittedBytes|, or |responseData|'s [=background fetch response/result=] not to be the empty string.
478480
1. Let |bytes| be null.
479481
1. If the [=byte sequence/length=] of |responseData|'s [=background fetch response/bytes=] is greater than |transmittedBytes| and |responseData| may be [=background fetch response/exposed=], then:
@@ -631,9 +633,9 @@ partial interface ServiceWorkerRegistration {
631633

632634
<div dfn-for="ServiceWorkerRegistration">
633635

634-
A {{ServiceWorkerRegistration}} has a <dfn>background fetch manager</dfn> (a {{BackgroundFetchManager}}), initially a new {{BackgroundFetchManager}} whose [=BackgroundFetchManager/service worker registration=] is the [=context object=]'s [=/service worker registration=].
636+
A {{ServiceWorkerRegistration}} has a <dfn>background fetch manager</dfn> (a {{BackgroundFetchManager}}), initially a new {{BackgroundFetchManager}} whose [=BackgroundFetchManager/service worker registration=] is the [=this=]'s [=/service worker registration=].
635637

636-
The <dfn attribute>backgroundFetch</dfn> attribute's getter must return the [=context object=]'s [=ServiceWorkerRegistration/background fetch manager=].
638+
The <dfn attribute>backgroundFetch</dfn> attribute's getter must return the [=this=]'s [=ServiceWorkerRegistration/background fetch manager=].
637639
</div>
638640

639641
## {{BackgroundFetchManager}} ## {#background-fetch-manager}
@@ -670,7 +672,7 @@ dictionary BackgroundFetchOptions : BackgroundFetchUIOptions {
670672
<div algorithm>
671673
The <dfn method>fetch(|id|, |requests|, |options|)</dfn> method, when invoked, run these steps:
672674

673-
1. Let |registration| be the [=context object=]'s [=BackgroundFetchManager/service worker registration=].
675+
1. Let |registration| be the [=this=]'s [=BackgroundFetchManager/service worker registration=].
674676
1. Let |records| be a new [=list=].
675677
1. Let |uploadTotal| be 0.
676678
1. If |requests| is a {{RequestInfo}}, set |requests| to « |requests| ».
@@ -684,7 +686,7 @@ dictionary BackgroundFetchOptions : BackgroundFetchUIOptions {
684686
1. [=list/Append=] |record| to |records|.
685687
1. Let |promise| be [=a new promise=].
686688
1. [=Enqueue the following steps=] to |registration|'s [=active background fetches edit queue=]:
687-
1. Let |permission| be the [=permission state=] for a {{PermissionDescriptor}} with {{PermissionDescriptor/name}} `"background-fetch"`, and the [=context object=]'s [=relevant settings object=].
689+
1. Let |permission| be the [=permission state=] for a {{PermissionDescriptor}} with {{PermissionDescriptor/name}} `"background-fetch"`, and the [=this=]'s [=relevant settings object=].
688690
1. If |permission| is `"denied"`, then reject |promise| with a {{NotAllowedError}} {{DOMException}} and abort these steps.
689691
1. Let |bgFetchMap| be |registration|'s [=active background fetches=].
690692
1. If |registration|'s [=service worker registration/active worker=] is null, then reject |promise| with a {{TypeError}} and abort these steps.
@@ -701,7 +703,7 @@ dictionary BackgroundFetchOptions : BackgroundFetchUIOptions {
701703

702704
Note: This ensures we have a copy of the request bytes before resolving.
703705
1. [=If aborted=] and |stream| is [=ReadableStream/readable=], then [=ReadableStream/error=] |stream| with an {{AbortError}} {{DOMException}} and abort these steps.
704-
1. Increment |uploadTotal| by |request|'s [=request/body=]'s [=body/total bytes=].
706+
1. Increment |uploadTotal| by |request|'s [=request/body=]'s [=body/length=].
705707
1. Decrement |requestBodiesRemaining| by 1.
706708
1. If at any point storing |requests| fails due to exceeding a quota limit, [=reject=] |promise| with a {{QuotaExceededError}} {{DOMException}} and abort these steps.
707709
1. Wait for |requestBodiesRemaining| to be 0, or |requestReadFailed| to be true.
@@ -723,8 +725,8 @@ dictionary BackgroundFetchOptions : BackgroundFetchUIOptions {
723725
:: |registration|.
724726
1. Set |bgFetchMap|[|id|] to |bgFetch|.
725727
1. [=Queue a bgfetch task=] to run these steps:
726-
1. [=Resolve=] |promise| with the result of [=getting a BackgroundFetchRegistration instance=] for |bgFetch| in the [=context object=]'s [=relevant Realm=].
727-
1. [=In parallel=], [=background fetch/display=] |bgFetch| from the [=context object=]'s [=relevant settings object=].
728+
1. [=Resolve=] |promise| with the result of [=getting a BackgroundFetchRegistration instance=] for |bgFetch| in the [=this=]'s [=relevant Realm=].
729+
1. [=In parallel=], [=background fetch/display=] |bgFetch| from the [=this=]'s [=relevant settings object=].
728730
1. [=In parallel=], [=perform a background fetch=] with |bgFetch|.
729731
1. Return |promise|.
730732
</div>
@@ -734,12 +736,12 @@ dictionary BackgroundFetchOptions : BackgroundFetchUIOptions {
734736
<div algorithm>
735737
The <dfn method>get(|id|)</dfn> method, when invoked, must return [=a new promise=] |promise| and run these steps [=in parallel=]:
736738

737-
1. Let |registration| be the [=context object=]'s associated [=BackgroundFetchManager/service worker registration=].
739+
1. Let |registration| be the [=this=]'s associated [=BackgroundFetchManager/service worker registration=].
738740
1. Let |bgFetch| be |registration|'s [=active background fetches=][|id|].
739741
1. If |bgFetch| is undefined, then [=resolve=] |promise| with undefined and abort these steps.
740742
1. [=Enqueue the following steps=] to |bgFetch|'s [=background fetch/update handling queue=]:
741743
1. [=Queue a bgfetch task=] |task| to run these steps:
742-
1. Let |bgFetchRegistration| be the result of [=getting a BackgroundFetchRegistration instance=] for |bgFetch| in the [=context object=]'s [=relevant Realm=].
744+
1. Let |bgFetchRegistration| be the result of [=getting a BackgroundFetchRegistration instance=] for |bgFetch| in the [=this=]'s [=relevant Realm=].
743745
1. [=Resolve=] |promise| with |bgFetchRegistration|.
744746
1. Wait for |task| to complete.
745747

@@ -751,7 +753,7 @@ dictionary BackgroundFetchOptions : BackgroundFetchUIOptions {
751753
<div algorithm>
752754
The <dfn method>getIds()</dfn> method, when invoked, must return [=a new promise=] |promise| and run these steps [=in parallel=]:
753755

754-
1. Let |registration| be the [=context object=]'s associated [=BackgroundFetchManager/service worker registration=].
756+
1. Let |registration| be the [=this=]'s associated [=BackgroundFetchManager/service worker registration=].
755757
1. [=Resolve=] |promise| with the result of [=map/getting the keys=] of |registration|'s [=active background fetches=].
756758
</div>
757759
</div>
@@ -812,21 +814,21 @@ enum BackgroundFetchFailureReason {
812814

813815
Note: The above values are copied so they're available synchronously.
814816

815-
The <dfn attribute>id</dfn> attribute's getter must return the [=context object=]'s [=BackgroundFetchRegistration/id=].
817+
The <dfn attribute>id</dfn> attribute's getter must return [=this=]'s [=BackgroundFetchRegistration/id=].
816818

817-
The <dfn attribute>uploadTotal</dfn> attribute's getter must return the [=context object=]'s [=BackgroundFetchRegistration/upload total=].
819+
The <dfn attribute>uploadTotal</dfn> attribute's getter must return [=this=]'s [=BackgroundFetchRegistration/upload total=].
818820

819-
The <dfn attribute>downloadTotal</dfn> attribute's getter must return the [=context object=]'s [=BackgroundFetchRegistration/download total=].
821+
The <dfn attribute>downloadTotal</dfn> attribute's getter must return [=this=]'s [=BackgroundFetchRegistration/download total=].
820822

821-
The <dfn attribute>uploaded</dfn> attribute's getter must return the [=context object=]'s [=BackgroundFetchRegistration/uploaded=].
823+
The <dfn attribute>uploaded</dfn> attribute's getter must return [=this=]'s [=BackgroundFetchRegistration/uploaded=].
822824

823-
The <dfn attribute>downloaded</dfn> attribute's getter must return the [=context object=]'s [=BackgroundFetchRegistration/downloaded=].
825+
The <dfn attribute>downloaded</dfn> attribute's getter must return [=this=]'s [=BackgroundFetchRegistration/downloaded=].
824826

825-
The <dfn attribute>result</dfn> attribute's getter must return the [=context object=]'s [=BackgroundFetchRegistration/result=].
827+
The <dfn attribute>result</dfn> attribute's getter must return [=this=]'s [=BackgroundFetchRegistration/result=].
826828

827-
The <dfn attribute>failureReason</dfn> attribute's getter must return the [=context object=]'s [=BackgroundFetchRegistration/failure reason=].
829+
The <dfn attribute>failureReason</dfn> attribute's getter must return [=this=]'s [=BackgroundFetchRegistration/failure reason=].
828830

829-
The <dfn attribute>recordsAvailable</dfn> attribute's getter must return true if the [=context object=]'s [=BackgroundFetchRegistration/records available flag=] is set, otherwise false.
831+
The <dfn attribute>recordsAvailable</dfn> attribute's getter must return true if [=this=]'s [=BackgroundFetchRegistration/records available flag=] is set, otherwise false.
830832

831833
### Events ### {#background-fetch-registration-events}
832834

@@ -839,7 +841,7 @@ enum BackgroundFetchFailureReason {
839841
<div algorithm>
840842
The <dfn method>abort()</dfn> method, when invoked, must return [=a new promise=] |promise| and run these steps [=in parallel=]:
841843

842-
1. Let |bgFetch| be the [=context object=]'s associated [=BackgroundFetchRegistration/background fetch=].
844+
1. Let |bgFetch| be [=this=]'s associated [=BackgroundFetchRegistration/background fetch=].
843845
1. Let |swRegistration| be |bgFetch|'s [=background fetch/service worker registration=].
844846
1. [=Enqueue the following steps=] to |swRegistration|'s [=active background fetches edit queue=]:
845847
1. Let |activeBgFetches| be |swRegistration|'s [=active background fetches=].
@@ -866,13 +868,13 @@ enum BackgroundFetchFailureReason {
866868
<div algorithm>
867869
The <dfn method>matchAll(|request|, |options|)</dfn> method, when invoked, must run these steps:
868870

869-
1. If the [=context object=]'s [=BackgroundFetchRegistration/records available flag=] is unset, return [=a promise rejected with=] an {{InvalidStateError}} {{DOMException}}.
871+
1. If [=this=]'s [=BackgroundFetchRegistration/records available flag=] is unset, return [=a promise rejected with=] an {{InvalidStateError}} {{DOMException}}.
870872
1. Let |promise| be [=a new promise=].
871873
1. Run these steps [=in parallel=]:
872874
1. Let |matchingRecords| be an empty [=list=].
873-
1. For each |record| of [=context object=]'s [=BackgroundFetchRegistration/background fetch=]'s [=background fetch/records=]:
875+
1. For each |record| of [=this=]'s [=BackgroundFetchRegistration/background fetch=]'s [=background fetch/records=]:
874876
1. If [=request matches cached item=] for |request|, |record|'s [=background fetch record/request=], |record|'s [=background fetch record/response data=]'s [=background fetch response/response=], and |options| returns true, then [=list/append=] |record| to |matchingRecords|.
875-
1. [=Queue a bgfetch task=] to [=resolve=] |promise| with the result of [=creating record objects=] from |matchingRecords| in the [=context object=]'s [=relevant Realm=].
877+
1. [=Queue a bgfetch task=] to [=resolve=] |promise| with the result of [=creating record objects=] from |matchingRecords| in [=this=]'s [=relevant Realm=].
876878
1. Return |promise|.
877879
</div>
878880
</div>
@@ -893,9 +895,9 @@ interface BackgroundFetchRecord {
893895
* A <dfn>request</dfn> (a [=/request=]).
894896
* A <dfn>response promise</dfn> (a {{Promise}} for a [=/response=]).
895897

896-
The <dfn attribute>request</dfn> attribute's getter must return the [=context object=]'s [=BackgroundFetchRecord/request=].
898+
The <dfn attribute>request</dfn> attribute's getter must return [=this=]'s [=BackgroundFetchRecord/request=].
897899

898-
The <dfn attribute>responseReady</dfn> attribute's getter must return the [=context object=]'s [=BackgroundFetchRecord/response promise=].
900+
The <dfn attribute>responseReady</dfn> attribute's getter must return [=this=]'s [=BackgroundFetchRecord/response promise=].
899901
</div>
900902

901903
## {{BackgroundFetchEvent}} ## {#background-fetch-event}
@@ -938,17 +940,17 @@ interface BackgroundFetchUpdateUIEvent : BackgroundFetchEvent {
938940
The <dfn method>updateUI(|options|)</dfn> method, when invoked, must return [=a new promise=] |promise| and run these steps [=in parallel=]:
939941

940942
1. If any of the following is true:
941-
* The [=context object=]'s {{Event/isTrusted}} attribute is false.
942-
* The [=context object=]'s [=BackgroundFetchUpdateUIEvent/UI updated flag=] is set.
943-
* The [=context object=] is not [=ExtendableEvent/active=].
943+
* [=this=]'s {{Event/isTrusted}} attribute is false.
944+
* [=this=]'s [=BackgroundFetchUpdateUIEvent/UI updated flag=] is set.
945+
* [=this=] is not [=ExtendableEvent/active=].
944946

945947
Issue: [ServiceWorker/1348](https://github.com/w3c/ServiceWorker/pull/1348).
946948

947949
Throw an {{InvalidStateError}} {{DOMException}}.
948950

949-
1. Set the [=context object=]'s [=BackgroundFetchUpdateUIEvent/UI updated flag=].
951+
1. Set [=this=]'s [=BackgroundFetchUpdateUIEvent/UI updated flag=].
950952
1. If |options| is null, return.
951-
1. Let |bgFetch| be the [=context object=]'s [=BackgroundFetchEvent/background fetch=].
953+
1. Let |bgFetch| be [=this=]'s [=BackgroundFetchEvent/background fetch=].
952954
1. If |options|'s {{BackgroundFetchUIOptions/icons}} member is present, set |bgFetch|'s [=background fetch/icons=] to |options|'s {{BackgroundFetchUIOptions/icons}}.
953955
1. If |options|'s {{BackgroundFetchUIOptions/title}} member is present, set |bgFetch|'s [=background fetch/title=] to |options|'s {{BackgroundFetchUIOptions/title}}.
954956
1. [=Resolve=] |promise|.

0 commit comments

Comments
 (0)