diff --git a/docs/index.bs b/docs/index.bs index 7ac9dff0..52a6d2ca 100644 --- a/docs/index.bs +++ b/docs/index.bs @@ -214,7 +214,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe A [=/service worker registration=] has an associated origin, an [=environment settings object/origin=]. - A [=/service worker registration=] has an associated id. + A [=/service worker registration=] has an associated id, a [=string=]. A [=/service worker registration=] has an associated installing worker (a [=/service worker=] or null) whose [=service worker/state=] is "`installing`". It is initially set to null. @@ -593,9 +593,8 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe 1, Let |oldestWorker| be the result of running [=Get Oldest Worker=] passing |registration| as the argument. 1. If |oldestWorker| is null, then: - 1. Return null. - 1. Else: - 1. Return |oldestWorker|'s [=service worker/scope url=]. + 1. Return null. + 1. Return |oldestWorker|'s [=service worker/scope url=].
registration.scope
, obtained from navigator.serviceWorker.ready.then(registration => console.log(registration.scope))
for example, will be "https://example.com/
".
@@ -618,7 +617,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. If |newestWorker| is null, return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}} and abort these steps.
1. If [=this=]'s [=relevant global object=] |globalObject| is a {{ServiceWorkerGlobalScope}} object, and |globalObject|'s associated [=ServiceWorkerGlobalScope/service worker=]'s state is "`installing`", return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}} and abort these steps.
1. Let |promise| be a promise.
- 1. Let |job| be the result of running Create Job with *update*, |registration|'s [=service worker registration/origin=], [=service worker registration/id=], null, |newestWorker|'s [=service worker/script url=], |promise|, and the [=this=]'s relevant settings object.
+ 1. Let |job| be the result of running Create Job with *update*, |registration|'s [=service worker registration/origin=], [=service worker registration/id=], null, |newestWorker|'s [=service worker/script url=], |promise|, and [=this=]'s relevant settings object.
1. Set |job|'s worker type to |newestWorker|'s [=service worker/type=].
1. Invoke Schedule Job with |job|.
1. Return |promise|.
@@ -634,7 +633,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |promise| be [=a new promise=].
1. Let |newestWorker| be the result of running Get Newest Worker algorithm passing |registration| as its argument.
1. If |newestWorker| is null, return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}} and abort these steps.
- 1. Let |job| be the result of running [=Create Job=] with *unregister*, the [=service worker registration/origin=], [=service worker registration/id=] of the [=ServiceWorkerRegistration/service worker registration=], null, null, |promise|, and the [=this=]'s relevant settings object.
+ 1. Let |job| be the result of running [=Create Job=] with *unregister*, the [=service worker registration/origin=], [=service worker registration/id=] of the [=ServiceWorkerRegistration/service worker registration=], null, null, |promise|, and [=this=]'s relevant settings object.
1. Invoke Schedule Job with |job|.
1. Return |promise|.
@@ -758,10 +757,10 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |client| be [=this=]'s [=ServiceWorkerContainer/service worker client=].
1. Let |scriptURL| be the result of parsing |scriptURL| with [=this=]'s relevant settings object's API base URL.
1. Let |scopeURL| be null.
- 1. If |options|.{{RegistrationOptions/scope}} is present, set |scopeURL| to the result of parsing |options|.{{RegistrationOptions/scope}} with the [=this=]'s relevant settings object's API base URL.
+ 1. If |options|["{{RegistrationOptions/scope}}"] is present, set |scopeURL| to the result of parsing |options|["{{RegistrationOptions/scope}}"] with the [=this=]'s relevant settings object's API base URL.
1. Let |id| be null.
- 1. If |options|.{{RegistrationOptions/id} is present, set |id| to |options|.{{RegistrationOptions/id}}.
- 1. Invoke [=Start Register=] with |id|, |scopeURL|, |scriptURL|, |p|, |client|, |client|'s creation URL, |options|.{{RegistrationOptions/type}}, and |options|.{{RegistrationOptions/updateViaCache}}.
+ 1. If |options|.{{RegistrationOptions/id} is present, set |id| to |options|["{{RegistrationOptions/id}}"].
+ 1. Invoke [=Start Register=] with |id|, |scopeURL|, |scriptURL|, |p|, |client|, |client|'s creation URL, |options|["{{RegistrationOptions/type}}"], and |options|["{{RegistrationOptions/updateViaCache}}"].
1. Return |p|.