method MessagePort.postMessage
Jump to headingMessagePort.postMessage(message: any,transfer: Transferable[],): void
Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
Parameters Jump to heading
Jump to headingmessage: any
Jump to headingtransfer: Transferable[]
Return Type Jump to heading
void
Jump to headingMessagePort.postMessage(message: any,options?: StructuredSerializeOptions,): void
Parameters Jump to heading
Jump to headingmessage: any
optional
Jump to headingoptions: StructuredSerializeOptions
Return Type Jump to heading
void