w3c / w3c/ServiceWorker

should blob URL clients have their controlled updated if their parent's controller is changed?

Open
#1,265 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bikeshed
Stars
3.6k
Forks
324
Avg merge
14d 22h
Merged PRs (30d)
1

Description

Currently we inherit the service worker controller from the parent client for blob URL windows and workers. We don't, however, do anything to handle the case where the parent's controller is changed after the blob URL is created. This can happen in only two ways right now:

  1. A service worker calls skipWaiting() and replaces an existing active worker.
  2. A service worker calls clients.claim().

Currently the spec will update the controller on a blob URL client in case (1). The spec updates does "For each service worker client client who is using registration:" which should include blob URL clients.

For claim, however, it attempts to match the service worker's scope against the client's creation URL. This will never match for blob: URL clients.

Should we consider propagating a controller change from a parent to the blob URL child client?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Service Worker specification's controller-update behavior, including the existing handling for blob URL clients and the clients.claim() scope-matching steps. Determine whether parent-to-child propagation is required, then document the resolved algorithm change and its expected behavior for the two cases described.

Written by the indexing model from the issue text.

Assessment

Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.