From 61eaf2bee35072a60668ad2213829bcda04649ac Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Tue, 19 Sep 2023 00:06:11 +0800 Subject: [PATCH 1/4] Update index.md --- files/en-us/web/api/client/postmessage/index.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/files/en-us/web/api/client/postmessage/index.md b/files/en-us/web/api/client/postmessage/index.md index a732ea1b8703887..245c5c6803bc0c1 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,12 @@ 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. - `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 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. ### Return value From 2ca75a72a47bc3b62a60f1ad2cbbe33380699793 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Tue, 19 Sep 2023 00:12:19 +0800 Subject: [PATCH 2/4] Update files/en-us/web/api/client/postmessage/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- files/en-us/web/api/client/postmessage/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/api/client/postmessage/index.md b/files/en-us/web/api/client/postmessage/index.md index 245c5c6803bc0c1..22dd47b93b6f05b 100644 --- a/files/en-us/web/api/client/postmessage/index.md +++ b/files/en-us/web/api/client/postmessage/index.md @@ -27,8 +27,8 @@ 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. + - : 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. - `transferables` {{optional_inline}} - : An optional 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. From 3c89399e1c19f3dfe5f2bb88840b2c7209849efb Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Thu, 21 Sep 2023 14:57:23 +0800 Subject: [PATCH 3/4] Update index.md --- files/en-us/web/api/client/postmessage/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/en-us/web/api/client/postmessage/index.md b/files/en-us/web/api/client/postmessage/index.md index 22dd47b93b6f05b..a676842eb6b1b6a 100644 --- a/files/en-us/web/api/client/postmessage/index.md +++ b/files/en-us/web/api/client/postmessage/index.md @@ -27,10 +27,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. + - : An optional object containing a `transfer` field with a sequence of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects). + The ownership of these objects is given to the destination side and they are no longer usable on the sending side. - `transferables` {{optional_inline}} - - : An optional sequence of objects that are [transferred](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) with the message. The + - : An optional sequence of [transferable objects](/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. ### Return value From 20c7b0fc7337f88483e1aecc6b5dba27df70fd08 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Thu, 21 Sep 2023 15:11:24 +0800 Subject: [PATCH 4/4] Update index.md --- files/en-us/web/api/client/postmessage/index.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/files/en-us/web/api/client/postmessage/index.md b/files/en-us/web/api/client/postmessage/index.md index a676842eb6b1b6a..11c7025dd0fe2f4 100644 --- a/files/en-us/web/api/client/postmessage/index.md +++ b/files/en-us/web/api/client/postmessage/index.md @@ -27,11 +27,9 @@ 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 a sequence of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects). - The ownership of these objects is given to the destination side and they are no longer usable on the sending side. + - : 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}} - - : An optional sequence of [transferable objects](/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