ZFE

ZFE

JavaScript API for embedding Host Access for the Cloud.

Mixes in EventEmitter for event listening.

Constructor

new ZFE(opts)

ZFE constructor. While both target and headless can be provided, only one or the other is required for construction.

Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
url String

URL of Host Access for the Cloud session server

target HTMLElement

DOM element into which the webclient will be inserted

headless Boolean

if true, the webclient will not be visually rendered

username String <optional>

if provided, this user will be logged in when connect is called

password String <optional>
domain String <optional>
preserveSessionOnDisconnect Boolean <optional>

Do not logout when disconnecting. Sessions will continue to run after disconnecting from HACloud.

Methods

connect() → {Promise}

Connect to the Host Access for the Cloud session server. If the user's login credentials are passed in on the constructor, the user will logged in automatically after successful connection.

Returns:

Promise which resolves when the SDK is connected and ready for use.

Type
Promise

disconnect() → {Promise}

See:

Log out and disconnect the SDK from the Host Access for the Cloud session server.

Returns:

Promise that resolves when logout request has been sent.

Type
Promise

getSessionManager() → {SessionManager}

Provides basic session management functions.

Returns:
Type
SessionManager

getMacroManager(session) → {MacroManager}

To interact with macros for the given session.

Parameters:
Name Type Description
session Session
Returns:
Type
MacroManager

Events

Event.ERROR

Fired when an error occurs.

Parameters:
Name Type Description
message String

The error message.