Gives user input focus to the current client and returns a Promise that resolves to the existing WindowClient.
Gives user input focus to the current client and returns a Promise that resolves to the existing WindowClient.
MDN
The focused read-only property of the WindowClient interface is a Boolean that indicates whether the current client has focus.
The focused read-only property of the WindowClient interface is a Boolean that indicates whether the current client has focus.
MDN
The id attribute must return its associated service worker client's id.
The id attribute must return its associated service worker client's id.
See ¶4.2.8 navigate(url) of ServiceWorker whatwg spec.
See ¶4.2.8 navigate(url) of ServiceWorker whatwg spec.
Promse[WindowClient] or null
the spec says this is of type any (?!)
https://html.spec.whatwg.org/multipage/infrastructure.html#transferable-objects
The url attribute must return the context object's associated service worker client's serialized creation url.
The url attribute must return the context object's associated service worker client's serialized creation url.
The visibilityState read-only property of the WindowClient interface indicates the visibility of the current client.
The visibilityState read-only property of the WindowClient interface indicates the visibility of the current client. This value can be one of hidden, visible, prerender, or unloaded.
MDN
The WindowClient interface of the ServiceWorker API represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources.
MDN