UNPKG

@ng1005/chrome-extension-common

Version:

chrome扩展通用库--消息与storage

20 lines (19 loc) 755 B
import MessageEventBus from "./MessageEventBus"; import IMessageInterface from "../interface/IMessageInterface"; export declare class WindowEventBus extends MessageEventBus implements IMessageInterface { script: string; constructor(script?: string); listener(): void; /** * 消息处理 * @param {*} request */ handler(request: any): Promise<this | undefined>; $emitContent(type: string, ...args: any): Promise<any>; $emitBackground(type: string, ...args: any): Promise<any>; $emitPopup(type: string, ...args: any): Promise<any>; $emitWindow(type: string, ...args: any): Promise<any>; $emitAllTabs(type: string, ...args: any): Promise<any>; } declare const $bus: WindowEventBus; export default $bus;