WebSocket.readyState read-only property returns the current state of the
var readyState = aWebSocket.readyState;
One of the following
unsigned short values:
- 0 (
- The connection is not yet open.
- 1 (
- The connection is open and ready to communicate.
- 2 (
- The connection is in the process of closing.
- 3 (
- The connection is closed or couldn't be opened.
|HTML Living Standard
The definition of 'WebSocket.readyState' in that specification.
|Living Standard||Initial definition|