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

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;
}