[w3c/ServiceWorker] Inconsistencies in ServiceWorkerClients get and matchAll implementations (Issue #1734)

I had a look at Chrome, Firefox and Safari implementation of ServiceWorkerClients get and matchAll implementations.
They are not really aligned for fetch event resultingClientId.

For ServiceWorkerClients.get called synchronously using resultingClientId from a navigation fetch event handler:
1. Chrome is waiting for the document to be parsed before resolving the get promise. This is shown in https://wpt.fyi/results/service-workers/service-worker/controlled-iframe-postMessage.https.html where the fetch response is waiting on `get` promise to resolve.
2. Firefox and Safari are resolving the promise right away (I believe Firefox exposes the client URL `about:blank` and Safari exposes the request URL)

For ServiceWorkerClients.matchAll called synchronously from a navigation fetch event handler
1. Chrome is not exposing the resultingClientId client
2. Firefox is exposing the resultingClientId client (url is `about:blank`)
3. Shipping Safari is exposing the resultingClientId client (url is the request URL), though WebKit ToT recently changed to match Chrome to fix some potential issues in case of push event processing.

@asutherland, @yoshisatoyanagisawa, thoughts?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1734
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/issues/1734@github.com>

Received on Monday, 4 November 2024 10:09:45 UTC