Jump to navigation

Class: EventBox

Numbas.schedule.EventBox

new EventBox()

Coordinates callbacks to run whenever named events happen.

Source:

Methods

on(name, callback)

Register a callback function which is called every time the event is triggered.

Parameters:
Name Type Description
name string
callback function
Source:

once(name) → {Promise}

Returns a promise which is resolved the next time the event is triggered.

Parameters:
Name Type Description
name string
Returns:
Type Description
Promise
Source: