Inconsistencies in ServiceWorkerClients get and matchAll implementations
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 3.6k
- Forks
- 324
- Avg merge
- 14d 22h
- Merged PRs (30d)
- 1
Description
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:
- 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
getpromise to resolve. - Firefox and Safari are resolving the promise right away (I believe Firefox exposes the client URL
about:blankand Safari exposes the request URL)
For ServiceWorkerClients.matchAll called synchronously from a navigation fetch event handler
- Chrome is not exposing the resultingClientId client
- Firefox is exposing the resultingClientId client (url is
about:blank) - 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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked WPT result for controlled-iframe-postMessage.https.html and compare the described ServiceWorkerClients.get and matchAll behavior across Chrome, Firefox, and Safari when called during a navigation fetch event using resultingClientId. Done requires an agreed cross-browser behavior and corresponding specification or test changes, but the issue does not identify files or a proposed resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100