pxt-core
Version:
Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors
20 lines (19 loc) • 749 B
TypeScript
declare type IframeClientSetMessagePortRequest = {
type: "iframeclientsetmessageport";
};
declare type IFrameClientReadyMessage = {
type: "iframeclientready";
};
export declare type IframeClientMessage = IframeClientSetMessagePortRequest | IFrameClientReadyMessage;
export declare class IFrameEmbeddedClient {
protected messageHandler: (message: MessageEvent) => void;
protected frameId: string | undefined;
protected port: MessagePort;
constructor(messageHandler: (message: MessageEvent) => void);
dispose(): void;
postMessage(message: any): void;
protected onMessageReceived: (event: MessageEvent) => void;
protected postMessageCore(message: any): void;
protected sendReadyMessage(): void;
}
export {};