ZFE

ZFE

JavaScript API for embedding ZFE.

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 ZFE 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 ZFE.

Methods

connect() → {Promise}

Connect to the ZFE session server. If the user's login credentials are passed in on the ZFE 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 ZFE session server.

Returns:

Promise that resolves when logout request has been sent.

Type
Promise

getSessionManager() → {SessionManager}

Provides basic ZFE 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.