API ReferenceGlobalsWorkerToMainThread

# Class: WorkerToMainThread

# Hierarchy

# Index

# Constructors

# Methods

# Constructors

# constructor

+ new WorkerToMainThread(callback: CommunicationInterfaceCallback, eventListener?: Worker): WorkerToMainThread

Overrides CommunicationInterface.constructor

Defined in packages/workers/src/worker-to-main-thread.ts:3

Parameters:

Name Type
callback CommunicationInterfaceCallback
eventListener? Worker

Returns: WorkerToMainThread

# Methods

# handleEvent

handleEvent(e: MessageEvent): void

Inherited from CommunicationInterface.handleEvent

Defined in packages/workers/src/communication-interface.ts:64

Parameters:

Name Type
e MessageEvent

Returns: void


# sendToMainThread

sendToMainThread(command: WORKER_MESSAGE, conversationId: number, data: any): void

Defined in packages/workers/src/worker-to-main-thread.ts:9

Parameters:

Name Type
command WORKER_MESSAGE
conversationId number
data any

Returns: void


# setEventPoster

setEventPoster(eventPoster: any): void

Inherited from CommunicationInterface.setEventPoster

Defined in packages/workers/src/communication-interface.ts:60

Parameters:

Name Type
eventPoster any

Returns: void