New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 612974 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Document that WindowClient.navigate() cannot navigate an uncontrolled client

Project Member Reported by jmedley@google.com, May 18 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36

Steps to reproduce the problem:
event.waitUntil(clients.matchAll({
      includeUncontrolled: true,
      type: 'window'
    }).then( activeClients => {
      if (activeClients.length > 0) {
        activeClients[0].navigate('index.html').then( client => { console.log("yea"); } )
        activeClients[0].focus();
}

What is the expected behavior?
The selected client window will navigate to the given url.

What went wrong?
Unknown

Did this work before? N/A 

Chrome version: 50.0.2661.102  Channel: stable
OS Version: OS X 10.11.4
Flash Version: Shockwave Flash 21.0 r0

Just to be clear, I'm not trying to navigate to a different origin, and I tried this on several variations of URL.

If it turns out that I missed some little thing required to make this work, please route this back to me as a documentation ticket. I'm the guy officially in charge of documenting that kind of stuff for JavaScript APIs.
 

Comment 1 by jmedley@google.com, May 18 2016

Did this work before?

Should have answered 'unknown' to this.

Comment 2 by japhet@chromium.org, May 23 2016

Components: -Blink Blink>ServiceWorker

Comment 3 by falken@chromium.org, May 27 2016

Labels: -OS-Mac Documentation OS-All
Owner: jmedley@chromium.org
Status: Assigned (was: Unconfirmed)
Summary: WindowClient.navigate() cannot navigate an uncontrolled page (was: WindowClient.navigate() always throws TypeError: Cannot navigate to URL)
I'm guessing the problem is that uncontrolled clients cannot be navigated.

This seems to be as specc'ed:
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#client-navigate-method
"If the context object’s associated service worker client’s active worker is not the incumbent settings object’s global object’s service worker, return a promise rejected with a TypeError."

Simple demo page at https://mattto.github.io/sw/test/navigate/
Messaging the worker (which makes it call navigate) only works once you have a controller.

Comment 4 by falken@chromium.org, May 27 2016

Cc: jakearchibald@chromium.org
Summary: Document that WindowClient.navigate() cannot navigate an uncontrolled client (was: WindowClient.navigate() cannot navigate an uncontrolled page)
Just to be clear, this is WAI (if I'm reading the spec correctly). I'm routing it back to jmedley@ as a documentation ticket.
Project Member

Comment 5 by sheriffbot@chromium.org, Jun 2 2016

Labels: Hotlist-Google
Cc: jmedley@google.com
Labels: -Pri-2 Pri-3
jmedley: Did you want to do anything with this bug? I see https://developer.mozilla.org/en-US/docs/Web/API/WindowClient/navigate mentions "controlled client" now.
Status: WontFix (was: Assigned)

Sign in to add a comment