BroadcastChannel

BroadcastChannel

package js-html

extends EventTarget

Available on js

The BroadcastChannel interface represents a named channel that any browsing context of a given origin can subscribe to. It allows communication between different documents (in different windows, tabs, frames or iframes) of the same origin. Messages are broadcasted via a message event fired at all BroadcastChannel objects listening to the channel.

Documentation BroadcastChannel by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Constructor

new (channel:String)

Throws:

null DOMError

Variables

read only name:String

Returns a DOMString, the name of the channel.

onmessage:Function

Is an EventHandler property that specifies the function to execute when a message event is fired on this object.

Methods

close ():Void

Closes the channel object, indicating it won't get any new messages, and allowing it to be, eventually, garbage collected.

postMessage (message:Dynamic):Void

Throws:

null DOMError

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/BroadcastChannel.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部