Document that WindowClient.navigate() cannot navigate an uncontrolled client |
|||||||
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.
,
May 23 2016
,
May 27 2016
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.
,
May 27 2016
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.
,
Jun 2 2016
,
Oct 5 2016
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.
,
Jul 5 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by jmedley@google.com
, May 18 2016