W3cubDocs

/Haxe JavaScript

MessageEvent

package js.html

extends Event

@:native("MessageEvent") Available on js

A MessageEvent is the interface representing a message received by a target, being a WebSocket or a WebRTC RTCDataChannel

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

See:

Constructor

new (type:String, ?eventInitDict:MessageEventInit)

Throws:

null DOMError

Variables

read only data:Dynamic

Returns a DOMString, Blob or an ArrayBuffer containing the data send by the emitter.

read only lastEventId:String

read only origin:String

Is a DOMString

read only ports:MessagePortList

read only source:EitherType<Window, MessagePort>

Methods

initMessageEvent (type:String, bubbles:Bool, cancelable:Bool, data:Dynamic, origin:String, lastEventId:String, source:EitherType<Window, MessagePort>, ports:Array<MessagePort>):Void

… Do not use this anymore: use the MessageEvent.MessageEvent constructor instead.

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/MessageEvent.html