Velocity Scripting APIs

Use JavaScript to customize Velocity's behavior. The following APIs are available.

(global)

Action

Device

Keyboard

Logger

ModernScreen

MQTTClient

Network

NFC

NFC.startCapture()

NFC.stopCapture()

Prompt

RetryMQTT

Scanner

Screen

Settings

Session

Storage

View

Voice

WLEvent

WebView JavaScript APIs

When connecting to a web host, there are two JavaScript engines that run.

The Velocity JavaScript engine maintains the current state of the session using scopes as outlined.

The WebView JavaScript engine has access to the DOM, and executes all JavaScript coming from the web server.

The exposed APIs available in the WebView JavaScript engine are all contained in the Velocity object. To use Velocity functions, either add the functions to the server, or use the View.evaluateJavascript function.

Velocity