From 6495b0f630742f9df46bb0ab4da056e0c5c3bb09 Mon Sep 17 00:00:00 2001 From: Yoshisato Yanagisawa Date: Thu, 1 May 2025 02:14:08 +0000 Subject: [PATCH] Correct ServiceWorkerRegistration Web IDL As mentioned in https://github.com/w3c/ServiceWorker/issues/1472, https://w3c.github.io/ServiceWorker/#resolve-job-promise-algorithm is written to return Promise. Also, according to https://wpt.fyi/results/service-workers/service-worker/update-result.https.html?label=experimental&label=master&aligned, all implementations are actually returning a ServiceWorkerRegistration. --- docs/index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.bs b/docs/index.bs index 1255935e..e4b7d362 100644 --- a/docs/index.bs +++ b/docs/index.bs @@ -556,7 +556,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/ readonly attribute USVString scope; readonly attribute ServiceWorkerUpdateViaCache updateViaCache; - [NewObject] Promise<undefined> update(); + [NewObject] Promise<ServiceWorkerRegistration> update(); [NewObject] Promise<boolean> unregister(); // event