A+ JavaScript interface version 1 (DRAFT)

This interface documents how a custom JavaScript code (provided as a plugin, by the content service, or by the assessment service) may hook into the exercise embedding process. The interface can be used to implemented custom exercise types or to replace the exercise embedding process.

N.B. This protocol is still a draft and is based on the current implementation in the A+ portal.

The Event Interface

The interface is based on the CustomEvent API. Here is a list of all the events part of the interface:

The list of exercise types, which may be part of the exericse_type field:

The postMessage API

The older interface is based on window.postMessage API. However, this interfaces is not as flexible as the Event API, hence all new code should use the Event API instead.