• Download
  • Demo
  • Buy
  • API
  • Docs
  • Support
  • About
  • Contact
  • Login
API Home
Namespaces
qzapiconfigsfilehidnetworkingprinterssecurityserialsocketusbwebsocket
API Home
Namespaces
qzapiconfigsfilehidnetworkingprinterssecurityserialsocketusbwebsocket

Namespace: api

qz.api

Calls related to compatibility adjustments
Source:
  • qz-tray.js, line 2733

Members

(static) isVersion

Checks for the specified version of connected QZ Tray application.
Source:
  • qz-tray.js, line 2769

Methods

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

Get version of connected QZ Tray application.
Source:
  • qz-tray.js, line 2756
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:
  • qz-tray.js, line 2783
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:
  • qz-tray.js, line 2799
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:
  • qz-tray.js, line 2811

(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:
  • qz-tray.js, line 2823

(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:
  • qz-tray.js, line 2835

(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:
  • qz-tray.js, line 2745
Returns:
Value of debugging flag
Type
boolean
Documentation generated by JSDoc 3.6.11

© 2025 qz | Privacy Policy