Add event listener

Register a listener to one of the supported events for a single widget instance.

    widgetId: <string>, 
    eventName: <string>, 
    function(eventName, eventData){


widgetId The widget ID identifies the widget and can be retrieved either from AlgebraKIT.injectWidgets() or from AlgebraKIT.getWidgets()
eventName The event to register to. Valid values are:
exercise-created The widget is injected in the page. Default the widget is in an inactive state until the student activates it by clicking on the widget.
exercise-activated The exercise was activated, either automatically (if configured) or manually by the student by clicking on the widget.
exercise-evaluate Sent after every input submitted by the student. eventData object contains inputExp: input expression
inputStatus: input evaluation
exerciseState: exercise status<
exercise-hint Student requests a hint.
exercise-finished Student has successfully finished the exercise.
about algebrakit contact us
Demo +31 624827648
Privacy Policy Eindhoven, the Netherlands
Copyright AlgebraKiT 2018