This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

reason

Summary

Indicates the reason the server closed the WebSocket connection.

Property of apis/websocket/CloseEventapis/websocket/CloseEvent

Syntax

Note: This property is read-only.

var result = element.reason;

Return Value

Returns an object of type StringString

Reason string is specific to the particular server and sub-protocol.

Related specifications

W3C WebSocket Specification
W3C Candidate Recommendation

Attributions