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: function() {
        console.log("Learnosity Events API is ready");
    },
description Function to be called on a Learnosity error event.
type function
default -
arguments object
    errorListener: function(e) {
        console.log(e);
    },

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

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