- From: Yoshisato Yanagisawa <notifications@github.com>
- Date: Tue, 29 Apr 2025 16:44:05 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/issues/1472/2840469985@github.com>
yoshisatoyanagisawa left a comment (w3c/ServiceWorker#1472) Let me check what is written in WebIDLs. Chromium: > `[CallWith=ScriptState, RaisesException] Promise<ServiceWorkerRegistration> update();` (https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/service_worker/service_worker_registration.idl;l=26;drc=047c7dc4ee1ce908d7fea38ca063fa2f80f92c77) Gecko: > ` [Throws, NewObject]` > `Promise<undefined> update();` (https://github.com/mozilla/gecko-dev/blob/fefa0c86cf24e6afa9f4dbb3823d4d16b2713dc7/dom/webidl/ServiceWorkerRegistration.webidl#L28) WebKit: > `[NewObject] Promise<undefined> update();` (https://github.com/WebKit/WebKit/blob/f8eb4cf035d529c6e55ebfd28c92fdc9468981d5/Source/WebCore/workers/service/ServiceWorkerRegistration.idl#L46) As @saschanaz pointed out, Gecko and WebKit returns `Promise<undefined>`. However, although the WebIDL looks invalid, Chromium seems to follow the step by step description in [Resolve Job Promise algorithm](https://w3c.github.io/ServiceWorker/#resolve-job-promise-algorithm). If mismatch of WebIDL and [Resolve Job Promise algorithm](https://w3c.github.io/ServiceWorker/#resolve-job-promise-algorithm) matters, adjusting the WebIDL can be a choice. What do you think? -- Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/issues/1472#issuecomment-2840469985 You are receiving this because you are subscribed to this thread. Message ID: <w3c/ServiceWorker/issues/1472/2840469985@github.com>
Received on Tuesday, 29 April 2025 23:44:09 UTC