Jump to navigation

Class: custom_answer_widget_constructor


new custom_answer_widget_constructor(element, part, title, events, answer_changed, options)

Name Type Description
element Element

The parent element of the widget.

part Numbas.parts.Part

The part whose answer the widget represents.

title string

The title attribute for the widget: a text description of what the widget represents.

events Object.<function()>

Callback functions for events triggered by the widget.

answer_changed Numbas.answer_widgets.answer_changed

A function to call when the entered answer changes.

options object

Any options for the widget.