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.