The task interface configuration guide describes the features of the HTML/JS/CSS editor. You can also try creating a task interface in Template Builder.
Gets the GPS coordinates of the Toloker, if they are available. In the TaskSuite and Task classes, it is available via this.geolocation
.
Methods:
Duplicates the navigator.geolocation.getCurrentPosition() functionality.
Duplicates the navigator.geolocation.watchPosition() functionality.
Storing data on the client. In the TaskSuite and Task classes, it is available via this.storage
.
Methods:
Save the value under a specific key. Parameters:
key
value
— Can be any type. Serialized by casting to a string.
expiration
— Storage date (Date
or number
). The default value is 24 hours.
Returns the value by key.
Deletes a value by key.
Task interface. In the TaskSuite and Task classes, it is available via this.taskInterface
.
Methods:
Opens the instructions.
Expands the task to full screen if it is collapsed. Otherwise minimizes the task.
Lets you subscribe to pressed keys. In the TaskSuite and Task classes, it is available via this.hotkey
.
Method:
Subscribes the passed handler to a specific event. Tracks events from the event
parameter. Parameters:
event
:
enter
— The “enter” key.
esc
— The “escape” key.
arrow-left
, arrow-right
, arrow-up
, arrow-down
— Arrows.
key
— Alphanumeric keys. Handler (the handler
parameter) gets the pressed key as the first argument.
handler
— The event handler.
context
— this
for the handler.
Cancels all previously made links and reinitializes the service.
Gets information about the device on which tasks are performed. In the TaskSuite and Task classes, it is available via this.clientInfo
.
Method:
Returns information about the device if the Toloker is using the mobile app:
deviceModel
— Mobile device model.Last updated: February 15, 2023