From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../api/broadcastchannel/postmessage/index.html | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/ru/web/api/broadcastchannel/postmessage/index.html (limited to 'files/ru/web/api/broadcastchannel/postmessage') diff --git a/files/ru/web/api/broadcastchannel/postmessage/index.html b/files/ru/web/api/broadcastchannel/postmessage/index.html new file mode 100644 index 0000000000..17ea5ad451 --- /dev/null +++ b/files/ru/web/api/broadcastchannel/postmessage/index.html @@ -0,0 +1,52 @@ +--- +title: BroadcastChannel.postMessage() +slug: Web/API/BroadcastChannel/postMessage +tags: + - API + - Broadcast Channel API + - BroadcastChannel + - HTML API + - Определение + - Экспериментальное + - метод +translation_of: Web/API/BroadcastChannel/postMessage +--- +

{{APIRef("BroadCastChannel API")}}

+ +

BroadcastChannel.postMessage() отправляет сообщение, которое может быть любым {{jsxref("Object", "объектом")}}, каждому слушателю в {{glossary("browsing context", "контексте браузера")}} с тем же {{glossary("origin")}}. Сообщение передается в виде события {{event("message")}} к каждому BroadcastChannel, привязанному к данному каналу.

+ +

{{AvailableInWorkers}}

+ +

Синтаксис

+ +
var str = channel.postMessage(object);
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарии
{{SpecName('HTML WHATWG', "comms.html#dom-broadcastchannel-postmessage", "BroadcastChannel.postmessage()")}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Совместимость

+ + + +

{{Compat("api.BroadcastChannel.postMessage")}}

+ +

См. также

+ + -- cgit v1.2.3-54-g00ecf