Interface WindowClient
interface WindowClient {
focused: boolean;
frameType: FrameType;
id: string;
type: ClientTypes;
url: string;
visibilityState: DocumentVisibilityState;
focus(): Promise<WindowClient>;
navigate(url: string | URL): Promise<WindowClient>;
postMessage(message: any, transfer: Transferable[]): void;
postMessage(message: any, options?: StructuredSerializeOptions): void;
}
focused: boolean;
frameType: FrameType;
id: string;
type: ClientTypes;
url: string;
visibilityState: DocumentVisibilityState;
focus(): Promise<WindowClient>;
navigate(url: string | URL): Promise<WindowClient>;
postMessage(message: any, transfer: Transferable[]): void;
postMessage(message: any, options?: StructuredSerializeOptions): void;
}
Hierarchy
- Client
- WindowClient (View Summary)
Index
Properties
Methods
Properties
Readonlyfocused
focused: boolean
ReadonlyframeType
Readonlyid
id: string
Readonlytype
Readonlyurl
url: string
ReadonlyvisibilityState
Methods
focus
- focus(): Promise<WindowClient>
Returns Promise<WindowClient>
navigate
- navigate(url: string | URL): Promise<WindowClient>
Parameters
- url: string | URL
Returns Promise<WindowClient>
postMessage
- postMessage(message: any, transfer: Transferable[]): void
Parameters
- message: any
- transfer: Transferable[]
Returns void
- postMessage(message: any, options?: StructuredSerializeOptions): void
Parameters
- message: any
Optionaloptions: StructuredSerializeOptions
Returns void
This ServiceWorker API interface 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 Reference