reason
Summary
The connection close text provided by the server.
Property of dom/CloseEventdom/CloseEvent
Syntax
var result = element.reason;
element.reason = value;
Return Value
Returns an object of type StringString
The connection close text provided by the server.
Examples
function getCloseReason(e) {
//retrieve close text for closeEvent
var closeReason = e.reason;
return closeReason;
}