Lifecycle API
Methods
The WMKS core
object uses lifecycle API methods to manage the connection with the target VM.
connect()
Connects the WMKS to a remote
virtual machine using the WebSocket URL and sets up the UI.
- Parameters
- Type: string. WebSocket URL in format:<ws|wss>://<host:port>/<path>/?<authentication info>
- Return Value
- None
- Example Call
- wmks.connect("ws://localhost:8080");
disconnect()
Disconnects from the remote
virtual machine and exits the UI.
- Parameters
- None
- Return Value
- None
- Example Call
- wmks.disconnect();
destroy()
Terminates any active
connection with the VM and removes the widget from the associated element.
Always call this method before removing a WMKS element from the HTML document
object model (DOM).
- Parameters
- None
- Return Value
- None
- Example Call
- wmks.destroy();