w3c / w3c/ServiceWorker

Sort out settings object for service worker module scripts

Open
#1,013 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

SW has different script execution model from other workers. SW's script fetching and running execute in separate places with a different lifecycle.

Fetch a module worker script graph requires a settings object in the fetching phase to pare the scripts. (Fetch a classic worker script also requires this argument as well but seems not using for parsing in the fetching phase.)

We need to fix it such that module scripts parsed during the fetching phase can be used in subsequent Run Service Worker script executions.

Issue reported in https://github.com/w3c/ServiceWorker/pull/1012#pullrequestreview-9860300.

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

The issue names the service worker module-script fetching phase and Run Service Worker script execution, but no files or tests. Start by tracing how the settings object is passed between those phases. Done means module scripts parsed during fetching can be used by subsequent service worker execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.