method MessagePort.postMessage
MessagePort.postMessage(message: any,transfer: Transferable[],): voidDeprecated
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.
transfer: Transferable[]voidMessagePort.postMessage(message: any,options?: StructuredSerializeOptions,): voidDeprecated
optional
options: StructuredSerializeOptionsvoid