Namespace: api

qz.api

Calls related to compatibility adjustments
Source:

Members

(static) isVersion

Checks for the specified version of connected QZ Tray application.
Source:

Methods

(static) getVersion() → {Promise.<(string|Error)>}

Get version of connected QZ Tray application.
Source:
Returns:
Version number of QZ Tray.
Type
Promise.<(string|Error)>

(static) isVersionGreater(major, minoropt, patchopt, buildopt) → {boolean}

Checks if the connected QZ Tray application is greater than the specified version.
Parameters:
Name Type Attributes Description
major string | number Major version to check
minor string | number <optional>
Minor version to check
patch string | number <optional>
Patch version to check
build string | number <optional>
Build version to check
Since:
  • 2.1.0-4
Source:
Returns:
True if connected version is greater than the version specified.
Type
boolean

(static) isVersionLess(major, minoropt, patchopt, buildopt) → {boolean}

Checks if the connected QZ Tray application is less than the specified version.
Parameters:
Name Type Attributes Description
major string | number Major version to check
minor string | number <optional>
Minor version to check
patch string | number <optional>
Patch version to check
build string | number <optional>
Build version to check
Since:
  • 2.1.0-4
Source:
Returns:
True if connected version is less than the version specified.
Type
boolean

(static) setPromiseType(promiser)

Change the promise library used by QZ API. Should be called before any initialization to avoid possible errors.
Parameters:
Name Type Description
promiser function Function({function} resolver) called to create new promises.
Source:

(static) setSha256Type(hasher)

Change the SHA-256 hashing function used by QZ API. Should be called before any initialization to avoid possible errors.
Parameters:
Name Type Description
hasher function Function({function} message) called to create hash of passed string.
Source:

(static) setWebSocketType(ws)

Change the WebSocket handler. Should be called before any initialization to avoid possible errors.
Parameters:
Name Type Description
ws function Function({function} WebSocket) called to override the internal WebSocket handler.
Source:

(static) showDebug(show) → {boolean}

Show or hide QZ api debugging statements in the browser console.
Parameters:
Name Type Description
show boolean Whether the debugging logs for QZ should be shown. Hidden by default.
Source:
Returns:
Value of debugging flag
Type
boolean