Module hotdrink_wasm::event::event_handler[][src]

A module for creating event handlers for the constraint system.

To use it, first construct a new EventHandler, add the desired callbacks, then pass in the handle_event function to the constraint system.

Examples

let cs = ...;
let event_handler = new EventHandler();
event_handler.subscribe("mycomp", "myvar");
cs.add_event_handler(event_handler.handle_event);

Structs

EventHandler

The main event handler containing the callbacks for variables.

JsCallback

A callback for handling events.