widget.on / widget.once / widget.off / widget.emit.
Subscribing
Emitting
Event types
The full vocabulary, by group:| Group | Events |
|---|---|
| Interaction | click, doubleclick, longpress, hover, focus, blur |
| Button | push, release |
| Input | change, input, submit, keydown, keyup, keypress |
| Slider / Range | slideStart, slide, slideEnd |
| Switch / Toggle | toggle, on, off |
| Lifecycle | load, ready, destroy, update |
| State | error, success, loading, loaded |
| Selection | select, deselect, optionchange |
| Touch / Gesture | touchstart, touchend, swipeleft, swiperight, swipeup, swipedown, pinch, zoom |
| Drag | dragstart, drag, dragend |
| Timer / Animation | timeout, interval, animationstart, animationend |
| Data | dataload, datafail, refresh |
Not every widget fires every event — a Switch fires
toggle/on/off, a Slider
fires slide*. Lifecycle events (load, ready, destroy) apply to all.Cleanup
Always keep the unsubscribe functions fromon/once if your script sets up
long-lived listeners, and call them when no longer needed to avoid duplicate
handlers across re-runs.
See widget API
The methods these events pair with.

