callbacks - Items API

Callbacks

The Callbacks object contains optional callback functions that allow detection of the ready status of an Items API instance and any errors encountered.

The readyListener callback in particular is very important for the correct functioning of Items API. Most of the methods provided by the returned object from window.LearnosityItems.init() will not be fully available until after the readyListener callback has triggered.

Properties

  • customUnload function

    This function is called when the learner attempts to close the browser window.

  • errorListener function

    This function is called when one of the preset Learnosity API errors are thrown.

  • readyListener function

    This function is called when the API has been successfully initialized.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.