Re: [w3c/ServiceWorker] Add Unregister Service Workers algorithm for use by other specifications (PR #1849)

@yoshisatoyanagisawa commented on this pull request.



> +  <section algorithm>
+    <h3 id="unregister-service-workers-algorithm"><dfn export>Unregister Service Workers</dfn></h3>
+
+      : Input
+      :: |storageKey|, a [=/storage key=]
+      : Output
+      :: None
+
+      1. Let |scopes| be a new [=list=].
+      1. [=list/For each=] (|entryStorageKey|, |serializedScope|) of [=registration map=]'s [=map/keys=]:
+          1. If |entryStorageKey| is not |storageKey|, [=continue=].
+          1. Let |scopeURL| be the result of <a lt="URL parser">parsing</a> |serializedScope|.
+          1. If |scopeURL| is failure, [=continue=].
+          1. [=list/Append=] |scopeURL| to |scopes|.
+      1. [=list/For each=] |scope| of |scopes|:
+          1. Let |job| be the result of running <a>Create Job</a> with *unregister*, |storageKey|, |scope|, null, null, and null.

I am not sure if the caller wants to ensure the registration destroyed or not.  If so, we may want to pass a new promise, and wait for all promise resolve after the loop.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1849#pullrequestreview-5130391040
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/pull/1849/review/5130391040@github.com>

Received on Monday, 7 September 2026 09:36:51 UTC