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.
| Method | Description |
|---|---|
| initCloseEvent |
Initializes the close event. |
Properties
The CloseEvent object has these properties.
| Property | Access type | Description |
|---|---|---|
|
Read-only |
The connection close-code provided by the server. | |
|
Read-only |
Server close-connection reason. | |
|
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
Show:
