Haxe API Documentation
Back | Index
extern class js.html.CloseEvent
extends Event
Available in js
A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute.

Documentation for this class was provided by MDN.
var code(default,null) : Int
The WebSocket connection close code provided by the server. See Status codes for possible values.
var reason(default,null) : String
A string indicating the reason the server closed the connection. This is specific to the particular server and sub-protocol.
var wasClean(default,null) : Bool
Indicates whether or not the connection was cleanly closed.
function new(type : String, ?canBubble : Bool, ?cancelable : Bool) : Void
Back | Index