@pistonite/workex
    Preparing search index...

    Type Alias WxWindow

    Controller for the global Window object for talking to other Windows

    type WxWindow = {
        frame(
            iframe: IFrameLike,
            onRecv: WxOnRecvFn,
            options?: WxEndOptions,
        ): Promise<WxResult<WxEnd>>;
        owner(
            ownerOrigin: string,
            onRecv: WxOnRecvFn,
            options?: WxEndOptions,
        ): Promise<WxResult<WxEnd>>;
        popup(
            url: string,
            onRecv: WxOnRecvFn,
            options?: WxWindowOpenOptions,
        ): Promise<WxResult<WxEnd>>;
    }
    Index

    Methods

    Methods

    • Create a WxEnd for messaging to the owner of the window. For window opened with window.open, this is the window that opened the window (i.e. the window.opener object). For iframes, this is the window that contains the iframe (i.e. the window.parent object).

      Note that if this window and the owner are same-origin, the browser may put them in the same context, in which case messaging is done by directly calling the handler, since they are in the same context.

      Parameters

      Returns Promise<WxResult<WxEnd>>