/** * This is a utility class for interacting with a framed document using `postMessage`. */ import { AlBehaviorPromise } from "../promises"; export declare class AlFrameMessageStream { frameURI: string; waitForMessage?: boolean; messagePrefix?: string; protected isReady: AlBehaviorPromise; protected container: HTMLElement; protected handlers: { [messageType: string]: { (data: any, rawEvent?: any, stream?: AlFrameMessageStream): void; }; }; /** * Constructor * * @param frameURI: where the iframe should be pointed to * @param waitForMessage: if truthy, the `start()` method will not resolve until the first message is received from the frame. * @param messagePrefix: if provided, only messages whose bodies include a `type` property starting with this value will be handled. */ constructor(frameURI: string, waitForMessage?: boolean, messagePrefix?: string); start(): Promise; ready(): Promise; stop(): void; on(messageType: string, handler: { (data: any, rawEvent?: any, stream?: AlFrameMessageStream): void; }): AlFrameMessageStream; private onReceiveMessage; private render; }