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
A [=/service worker registration=] has an associated <dfn export id="dfn-origin">origin</dfn>, an [=environment settings object/origin=].
216
216
217
-
A [=/service worker registration=] has an associated <dfn export id="dfn-id">id</dfn>.
217
+
A [=/service worker registration=] has an associated <dfn export id="dfn-id">id</dfn>, a [=string=].
218
218
219
219
A [=/service worker registration=] has an associated <dfn export id="dfn-installing-worker">installing worker</dfn> (a [=/service worker=] or null) whose [=service worker/state=] is "`installing`". It is initially set to null.
In the example in [[#service-worker-url]], the value of <code>registration.scope</code>, obtained from <code>navigator.serviceWorker.ready.then(registration => console.log(registration.scope))</code> for example, will be "<code>https://example.com/</code>".
1. If |newestWorker| is null, return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}} and abort these steps.
619
618
1. If [=this=]'s [=relevant global object=] |globalObject| is a {{ServiceWorkerGlobalScope}} object, and |globalObject|'s associated [=ServiceWorkerGlobalScope/service worker=]'s <a>state</a> is "`installing`", return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}} and abort these steps.
620
619
1. Let |promise| be a <a>promise</a>.
621
-
1. Let |job| be the result of running <a>Create Job</a> with *update*, |registration|'s [=service worker registration/origin=], [=service worker registration/id=], null, |newestWorker|'s [=service worker/script url=], |promise|, and the [=this=]'s <a>relevant settings object</a>.
620
+
1. Let |job| be the result of running <a>Create Job</a> with *update*, |registration|'s [=service worker registration/origin=], [=service worker registration/id=], null, |newestWorker|'s [=service worker/script url=], |promise|, and [=this=]'s <a>relevant settings object</a>.
622
621
1. Set |job|'s <a>worker type</a> to |newestWorker|'s [=service worker/type=].
1. Let |newestWorker| be the result of running <a>Get Newest Worker</a> algorithm passing |registration| as its argument.
636
635
1. If |newestWorker| is null, return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}} and abort these steps.
637
-
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 <a>relevant settings object</a>.
636
+
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 <a>relevant settings object</a>.
1. Let |client| be [=this=]'s [=ServiceWorkerContainer/service worker client=].
759
758
1. Let |scriptURL| be the result of <a lt="URL parser">parsing</a> |scriptURL| with [=this=]'s <a>relevant settings object</a>'s <a>API base URL</a>.
760
759
1. Let |scopeURL| be null.
761
-
1. If |options|.{{RegistrationOptions/scope}} is <a>present</a>, set |scopeURL| to the result of <a lt="URL parser">parsing</a> |options|.{{RegistrationOptions/scope}} with the [=this=]'s <a>relevant settings object</a>'s <a>API base URL</a>.
760
+
1. If |options|["{{RegistrationOptions/scope}}"] is <a>present</a>, set |scopeURL| to the result of <a lt="URL parser">parsing</a> |options|["{{RegistrationOptions/scope}}"] with the [=this=]'s <a>relevant settings object</a>'s <a>API base URL</a>.
762
761
1. Let |id| be null.
763
-
1. If |options|.{{RegistrationOptions/id} is <a>present</a>, set |id| to |options|.{{RegistrationOptions/id}}.
764
-
1. Invoke [=Start Register=] with |id|, |scopeURL|, |scriptURL|, |p|, |client|, |client|'s <a>creation URL</a>, |options|.{{RegistrationOptions/type}}, and |options|.{{RegistrationOptions/updateViaCache}}.
762
+
1. If |options|.{{RegistrationOptions/id} is <a>present</a>, set |id| to |options|["{{RegistrationOptions/id}}"].
763
+
1. Invoke [=Start Register=] with |id|, |scopeURL|, |scriptURL|, |p|, |client|, |client|'s <a>creation URL</a>, |options|["{{RegistrationOptions/type}}"], and |options|["{{RegistrationOptions/updateViaCache}}"].
0 commit comments