CloseEvent
Extends: Event
See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
- CloseEvent
- new CloseEvent(code, reason, wasClean)
- .code
- .reason
- .wasClean
- .type
- .isTrusted :
boolean
- .target :
Node
- .currentTarget :
Node
- .bubbles :
boolean
- .cancelable :
boolean
- .eventPhase
- .defaultPrevented :
boolean
- .returnValue :
*
- .preventDefault()
- .stopImmediatePropagation()
- .stopPropagation()
new CloseEvent(code, reason, wasClean)
Creates an instance of CloseEvent.
Param | Type |
---|---|
code | * |
reason | * |
wasClean | * |
closeEvent.code
Returns: number
- returns the close code sent by the server.
closeEvent.reason
Returns: number
- returns the string indicating the reason the server closed the connection..
closeEvent.wasClean
Returns: boolean
- returns a boolean that inndicates whether or not the connection was cleanly closed.
closeEvent.type
Read only
closeEvent.isTrusted : boolean
Read only
closeEvent.target : Node
Read only
closeEvent.currentTarget : Node
Read only
closeEvent.bubbles : boolean
Read only
closeEvent.cancelable : boolean
Read only
closeEvent.eventPhase
Read only
closeEvent.defaultPrevented : boolean
Read only