# Worker.postMessage(Object message)

Sends messages to the main thread/worker thread.

# Parameters

# Object message

The message to be sent, which must be a serializable object in the format of JavaScript key-value.

# Sample Code

In the worker thread

  msg: 'hello from worker'

In the main thread

const worker = wx.createWorker('workers/request/index.js')

  msg: 'hello from main'