Verona Inferfaces Specification "Widget" 0.2.0

This is one part of the Verona Online Assessment Standards. All messages are sent via the postMessage function of the html page. The widget takes the page root of its parent as target (parent.window), and the application binds the function call to the iframe element of the widget.

Most important, the message body carries as first parameter the operationId of the message.

The html page MUST contain a script-tag with metadata. The syntax and structure of this data are described here.

Operations

  • SEND vowReadyNotification

    Ready Notification

    The widget announces that it's code is loaded and initialized so the communication can start.

    Operation IDvowReadyNotification

    Accepts the following message:

    object

    Examples

  • RECEIVE vowStartCommand

    Start Command

    The application sends execution parameters.

    Operation IDvowStartCommand

    Accepts the following message:

    object

    Examples

  • SEND vowStateChangedNotification

    State Changed Notification

    The widget sends state data.

    Operation IDvowStateChangedNotification

    Accepts the following message:

    object

    Examples

  • SEND vowReturnRequested

    Close Requested

    The widget calls for closing the widget dialog.

    Operation IDvowReturnRequested

    Accepts the following message:

    object

    Examples

Schemas

  • SessionIdString
    string

    The session id flags all communication. If a message has no or empty session id, it's not processed. The session id is unique and was generated by the application. Any simple algorithm would work. The session id helps to link the correct unit with the data of the message. Using the id of the editor hosting html element is less reliable, because the element could be reused with another unit.

  • object

    This object structure is used to share data between instances of the module. The host may collect all shared data sent by modules and provide it to every module.

  • object