class VMSession view source

A VM driven Session

Constructor

new VMSession(identifier : string)

Parameters

identifier string session identifier
Instance members

closeSession(forceServer : boolean)

Terminate the session (This is always called by window.onunload with forceServer=true)

Parameters

forceServer boolean true to send a session close (/ua/close) to the server (if supported)

emit(type : string, arguments… : any)
[inherits from EventListener]

Emit an event

Parameters

type string event type to emit
arguments any arguments (excluding type) will be set in event.data

getApplications() : (Array)

Get all running applications

Returns

(Array) an array of applications or null

getSessionId() : (string)

Get the session ID

Returns

(string) the session ID

isDestroyed() : (boolean)
[inherits from EventListener]

Returns if the node is destroyed

Returns

(boolean) true if node is destroyed

when(type : string, handler : Hook, once : boolean) : (HandleRegistration)
[inherits from EventListener]

Registers a handler for this event type

Parameters

type string event type (e.g. "attribute changed")
handler Hook handler to trigger when the event type is emitted
once boolean if true, will only fire once

Returns

(HandleRegistration) a registration handle (for unbind purpose)