diff --git a/files/en-us/web/api/client/postmessage/index.md b/files/en-us/web/api/client/postmessage/index.md index a732ea1b8703887..11c7025dd0fe2f4 100644 --- a/files/en-us/web/api/client/postmessage/index.md +++ b/files/en-us/web/api/client/postmessage/index.md @@ -18,6 +18,7 @@ message is received in the "`message`" event on ```js-nolint postMessage(message) +postMessage(message, options) postMessage(message, transferables) ``` @@ -25,10 +26,10 @@ postMessage(message, transferables) - `message` - : The message to send to the client. This can be any [structured-cloneable type](/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). +- `options` {{optional_inline}} + - : An optional object containing a `transfer` field with an [array](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side. - `transferables` {{optional_inline}} - - : A sequence of objects that are [transferred](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) with the message. The - ownership of these objects is given to the destination side and they are no longer - usable on the sending side. + - : An optional [array](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side. ### Return value