Global

Methods

onYalstVisitorAPILoaded(api)

Global function optionally provided by the implementer. Called by the api loader once when the VisitorAPI is loaded into the JavaScript context of the web page. This only applies when loading the VisitorAPI library via a <script> tag or <script> tag injection.
Parameters:
Name Type Description
api object the VisitorAPI (same as LiveSupport.VisitorAPI)
Source:

Type Definitions

resultCallback(resultOrError)

Callback function provided by the implementer to receive the result of asynchronous API methods.
Callbacks are always executed in a later run of the Javascript event loop like in Node's process.nextTick(callback) or setTimeout(callback, 0), i.e. never immediately or synchronously to the method call.
Parameters:
Name Type Description
resultOrError * | LiveSupport.ManagedError | Error The result of the asynchronous process or an API error. If the API call has failed resultOrError instanceof Error is true.
Source:

shouldInviteCallback(shouldDisplayActiveInvitation, error)

The callback taken by LiveSupport.VisitorAPI.shouldInvite.
Parameters:
Name Type Description
shouldDisplayActiveInvitation boolean If `true` the calling web page should present an visual layer to invite the visitor to a chat.
error Error Error set if a network error has occurred.
Source:

userCallback(error)

The user callback taken by LiveSupport.VisitorAPI.startControlling.
Parameters:
Name Type Description
error Error Error set in case of a failure.
Source: