@dapplets/dapplet-extension
Version:
The Bridge to the Augmented Web.
40 lines (39 loc) • 1.2 kB
TypeScript
import { IOverlay, OverlayConfig, OverlaySourceModule } from '../interfaces';
import { OverlayManager } from './overlayManager';
export declare class Overlay implements IOverlay {
private _manager;
url: string;
title: string;
source: string;
hidden: boolean;
parent: IOverlay;
module: OverlaySourceModule;
isSystemPopup: boolean;
registryUrl: string;
_queue: any[];
_isFrameLoaded: boolean;
private _msgCount;
readonly id: string;
frame: HTMLIFrameElement;
registered: boolean;
onmessage: (topic: string, message: any) => void;
onclose: Function;
onregisteredchange: (value: boolean) => void;
isError: boolean;
constructor(_manager: OverlayManager, config: OverlayConfig);
/**
* Opens tab. If it doesn't exist, then adds tab to the panel.
*/
open(callback?: Function): void;
/**
* Removes tab from the panel.
*/
close(): void;
send(topic: string, args: any[]): void;
private _send;
exec(topic: string, message: any): Promise<unknown>;
onMessage(handler: (topic: string, message: any) => void): {
off: () => void;
};
checkAvailability(): Promise<void>;
}