Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / webidl / Client.webidl
blob5dc9b6ea4844dd2c4335400d6b17a5cb1c49c2b1
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://w3c.github.io/ServiceWorker/#client-interface
8  *
9  */
11 [Exposed=ServiceWorker]
12 interface Client {
13   readonly attribute USVString url;
15   // Remove frameType in bug 1290936
16   [BinaryName="GetFrameType"]
17   readonly attribute FrameType frameType;
19   readonly attribute ClientType type;
20   readonly attribute DOMString id;
22   // Implement reserved in bug 1264177
23   // readonly attribute boolean reserved;
25   [Throws]
26   undefined postMessage(any message, sequence<object> transfer);
27   [Throws]
28   undefined postMessage(any message, optional StructuredSerializeOptions aOptions = {});
31 [Exposed=ServiceWorker]
32 interface WindowClient : Client {
33   [BinaryName="GetVisibilityState"]
34   readonly attribute VisibilityState visibilityState;
35   readonly attribute boolean focused;
37   // Implement ancestorOrigins in bug 1264180
38   // [SameObject] readonly attribute FrozenArray<USVString> ancestorOrigins;
40   [Throws, NewObject, NeedsCallerType]
41   Promise<WindowClient> focus();
43   [Throws, NewObject]
44   Promise<WindowClient> navigate(USVString url);
47 // Remove FrameType in bug 1290936
48 enum FrameType {
49   "auxiliary",
50   "top-level",
51   "nested",
52   "none"