This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.

Event Options

This article describes the Event options that can be set on initialisation and details how the Events API can be provided with function callbacks for certain events.

description Function to be called when Events API has been successfully initialised.
type function
default -
arguments -

readyListener example

   readyListener: function() {
        console.log("Learnosity Events API is ready");
description Function to be called on a Learnosity error event.
type function
default -
arguments object

errorListener example

    errorListener: function(e) {

    /* example object
        code: 10000,
        msg: "Failed to load report data"

var eventsApp = LearnosityEvents.init(initOptions, eventOptions);