w3c / w3c/ServiceWorker

OpenWindow lacks either sourceDocument or userInvolvement argument when running Navigate algorithm

Open
#1,776 7 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

In the step 7.2.1 of openWindow:

HandleNavigate: Navigate newContext to url with exceptionsEnabled true, and historyHandling "replace".

It doesn't pass source document here so it becomes the default value null, nor the user involvement argument which becomes "none". And the step 5 of the navigate algorithm:

  1. If sourceDocument is null:
    1. Assert: userInvolvement is "browser UI".

Which ends up with an assertion failure.

There's no document to pass (as this is a service worker function), so it seems the only way to make it happy is to pass the user involvement argument, but not sure "browser UI" fits here because the caller is certainly the script here. Thoughts?

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 with step 7.2.1 of openWindow and step 5 of the Navigate algorithm, following the linked Service Worker and HTML specifications. Determine the intended sourceDocument and userInvolvement arguments for service-worker navigation, then update the specification so the algorithms no longer reach the reported assertion failure.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.