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;
}
Index
Properties
Methods
Properties
Readonly
focused
focused: boolean
Readonly
frameType
Readonly
id
id: string
Readonly
type
Readonly
url
url: string
Readonly
visibilityState
Methods
focus
- focus(): Promise<WindowClient>
Returns Promise<WindowClient>
navigate
- navigate(url): Promise<WindowClient>
Parameters
- url: string | URL
Returns Promise<WindowClient>
postMessage
- post
Message (message, transfer): void Parameters
- message: any
- transfer: Transferable[]
Returns void
- post
Message (message, options?): void Parameters
- message: any
Optional
options: 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