Windows Dev Center

CloseEvent object

Sent to clients using WebSockets when the connection is closed.

DOM Information

Inheritance Hierarchy

 Event
   CloseEvent

Members

The CloseEvent object has these types of members:

Methods

The CloseEvent object has these methods.

MethodDescription
initCloseEvent

Initializes the close event.

 

Properties

The CloseEvent object has these properties.

PropertyAccess typeDescription

code

Read-only

The connection close-code provided by the server.

reason

Read-only

Server close-connection reason.

wasClean

Read-only

Indicates whether the server connection closed cleanly.

 

Remarks

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.

See also

Event

 

 

Show:
© 2015 Microsoft