w3c / w3c/ServiceWorker

should Client.navigate() reject on uncontrolled clients?

Open
#1,254 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently step 4 here:

https://w3c.github.io/ServiceWorker/#client-navigate

Requires that the Client.navigate(url) method reject if its called a Client that is not controlled by the current service worker.

What is the purpose of this restriction?

I believe an origin could easily use Client.postMessage() and then modify window.location. AIUI this is the same rationale why we don't require interaction for navigate(). Is this restriction legacy from before includeUncontrolled:true?

This came up because we were not aware of this spec step and I tried to fix the WPT in https://github.com/w3c/web-platform-tests/pull/8743.

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

Read step 4 of the Client.navigate(url) algorithm in the linked Service Worker specification and review the referenced WPT pull request 8743. Determine whether the uncontrolled-client rejection is still intended, using the issue's postMessage and window.location comparison; done requires a resolved specification decision and corresponding WPT outcome.

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.