code

external val code: Short(source)

The code read-only property of the CloseEvent interface returns a WebSocket connection close code indicating the reason the connection was closed.

MDN Reference