[Type] Callback
Part of: mobl
Inherits from: mobl::Object
Callback
is essentially an alias for Function1<DOMEvent,?>
. It is typically used to handle UI events.
Instantiation
A new Callback
can be created by using the callback literal syntax.
Example:
var cb = { alert("Hello!"); };
screen root() {
button("OK", onclick={
alert("Hello!");
})
}
A callback literal gets an implicit argument event
of type DOMEvent that can be used to get more information about the event.