ParentPort

external interface ParentPort : EventEmitter(source)

Functions

Link copied to clipboard
abstract fun addListener(event: ParentPortEvent.MESSAGE, listener: (messageEvent: MessageEvent) -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun off(event: ParentPortEvent.MESSAGE, listener: (messageEvent: MessageEvent) -> Unit)
Link copied to clipboard
abstract fun on(event: ParentPortEvent.MESSAGE, listener: (messageEvent: MessageEvent) -> Unit)

Emitted when the process receives a message. Messages received on this port will be queued up until a handler is registered for this event.

Link copied to clipboard
abstract fun once(event: ParentPortEvent.MESSAGE, listener: (messageEvent: MessageEvent) -> Unit)
Link copied to clipboard
abstract fun postMessage(message: Any?)

Sends a message from the process to its parent.

Link copied to clipboard
abstract fun removeListener(event: ParentPortEvent.MESSAGE, listener: (messageEvent: MessageEvent) -> Unit)
Link copied to clipboard