Skip to main content

Runtime Port (ports)

Classes

RuntimePort

import { RuntimePort } from '@hexajs-dev/ports';
class RuntimePort { ... }

Methods

getURL()

getURL(path?: string): string

onMessage()

onMessage(callback: (message: any, sender: webExt.runtime.MessageSender, sendResponse: (response?: any) => void) => boolean | void): () => void

onSuspend()

onSuspend(callback: () => void): void

reload()

reload(): void

sendMessage()

sendMessage(message: any): Promise<any>