# Worker.onMessage(function callback)
with Promise style call: Not supported
Mini Program plugin: Not supported
Monitor main thread/Worker Event of a message sent by a thread to the current thread.
# parameter
# function callback
Main thread/Worker Callback function for the event of a message sent by a thread to the current thread
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
message | Object | Main thread/Worker Message sent by thread to current thread |