To learn more about using JavaScript in LeanFT, see Setting up and working with the JavaScript SDK.
For JavaScript code samples, see Code Samples - JavaScript.

Window

TerminalEmulators. Window

new Window(propsopt) → {Window}

The description of a terminal emulator window that fully supports HLLAPI.
Parameters:
Name Type Attributes Description
props Object <optional>
Initializes an window test object using the supplied property bag.
Returns:
the description object that was initialized.
Type
Window

Methods

emulatorStatus() → {TerminalEmulators.EmulatorStatus|Description}

Returns the current emulator status.
Possible values: 'ready', 'disconnected', 'busy', 'locked', 'unavailable'.
Parameters:
Name Type Attributes Description
TerminalEmulators.emulatorStatus TerminalEmulators.EmulatorStatus <optional>
When provided, this method acts as a setter and sets the emulatorStatus value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored emulatorStatus value; otherwise it returns 'this' for use with the builder pattern.
Type
TerminalEmulators.EmulatorStatus | Description

handle(handleopt) → {number|Description}

Returns a handle to a window.
Parameters:
Name Type Attributes Description
handle number <optional>
When provided, this method acts as a setter and sets the handle value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored handle value; otherwise it returns 'this' for use with the builder pattern.
Type
number | Description

protocol(protocolopt) → {TerminalEmulators.Protocol|Description}

Returns the current protocol.
Possible values: 'pR_3270', 'pR_5250', 'pR_VT100', 'pR_OTHER'.
Parameters:
Name Type Attributes Description
protocol TerminalEmulators.Protocol <optional>
When provided, this method acts as a setter and sets the protocol value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored protocol value; otherwise it returns 'this' for use with the builder pattern.
Type
TerminalEmulators.Protocol | Description

shortName(shortNameopt) → {string|Description}

Returns the short name of the window.
Parameters:
Name Type Attributes Description
shortName string <optional>
When provided, this method acts as a setter and sets the shortName value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored shortName value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description