w3c / w3c/ServiceWorker

spec behavior when ServiceWorkerContainer parent client is dead

Open
#777 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

apr-2017-f2f-v1 TPAC2026
Dominant language
Bikeshed
Stars
3.6k
Forks
324
Avg merge
14d 22h
Merged PRs (30d)
1

Description

This is kind of a corner case, but I don't think the spec really handles it currently:

  1. open a random webpage
  2. w = window.open("./")
  3. sw = w.navigator.serviceWorker
  4. close the new tab from step 1
  5. sw.register("whatever.js");

In this case we're calling .register() for a window that is already closed. I'm intending to reject with InvalidStateErr, but I guess it would be nice to spec it.

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 the ServiceWorkerContainer.register() behavior and the parent-client handling described by the reproduction steps. Specify and validate that calling register() after the client window is closed rejects with InvalidStateErr; the issue names no source file or test to update.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, documentation, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.