Module which defines the Widget data type and operations which apply to all widgets.
- class (Typeable c, Typeable s, Show c, FromJSON s, ToJSON s) => Widget c s | c -> s where
- data WidgetId
- getWidgetState :: Widget w s => w -> CallbackM (Maybe s)
- setWidgetState :: Widget w s => w -> s -> CallbackM ()
- widgetSelector :: Widget w s => w -> SimpleSelector
Get the widget ID.
Render widget to HTML.
The function returned MUST be a nullary function which is invoked
this set to a jQuery query result containing the widget.
the client. The function receives the encoded state and must
update the client-side widget. The
this reference will be a jQuery
query result containing the widget.
Print for debugging.
Supply content for head merge when a widget of type w is first added to the application.
Resources required by a widget of this type.
Update the value of a widget. This function pushes the new value to the browser.