class js.html.MessageEvent extends Event

Available on js

DRAFT
This page is not complete.

A MessageEvent is sent to clients using WebSockets when data is received from the server. This is delivered to the listener indicated by the WebSocket object's onmessage attribute.



Documentation for this class was provided by MDN.

Instance Fields

var data:Dynamic

The data from the server.

function new(type:String, ?canBubble:Bool, ?cancelable:Bool):Void

function initMessageEvent(typeArg:String, canBubbleArg:Bool, cancelableArg:Bool, dataArg:Dynamic, originArg:String, lastEventIdArg:String, sourceArg:DOMWindow, transferables:Array<Dynamic>):Void

function initMessageEvent(typeArg:String, canBubbleArg:Bool, cancelableArg:Bool, dataArg:Dynamic, originArg:String, lastEventIdArg:String, sourceArg:DOMWindow, messagePorts:Array<Dynamic>):Void