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.

code

Summary

The connection close code provided by the server.

Property of dom/CloseEventdom/CloseEvent

Syntax

Note: This property is read-only.

var closeCode = event.code;

Return Value

Returns an object of type NumberNumber

The close code provided by the server.

Examples

function getCloseCode(e) {
//retrieve close code for closeEvent
var closeCode = e.code;
return closeCode;
}

Attributions