Interface WindowClient

    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

    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;
    }
    Hierarchy

    Properties

    focused: boolean
    frameType: FrameType
    id: string
    url: string
    visibilityState: DocumentVisibilityState

    Methods