initCloseEvent method
Initializes the close event.
Syntax
HRESULT retVal = object.initCloseEvent(typeArg, canBubbleArg, cancelableArg, wasCleanArg, codeArg, reasonArg);
Parameters
typeArg [in]
Type: DOMStringThe type of the event being created.
canBubbleArg [in]
Type: booleanIndicates whether the event can bubble. When true the event should propagate upward. When false the event does not propagate upward.
cancelableArg [in]
Type: booleanIndicates whether the event’s default action can be prevented. When true, the default action can be canceled. When false, the default action cannot be canceled.
wasCleanArg [in]
Type: booleanRepresents whether the connection closed cleanly or not.
codeArg [in]
Type: unsigned longRepresents the WebSocket connection close code provided by the server.
reasonArg [in]
Type: DOMStringRepresents the WebSocket connection close reason provided by the server.
Return value
Type: HRESULT
This method can return one of these values.
S_OK
Remarks
Initializes the event in a manner analogous to the similarly-named method in the DOM events.