lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
18 lines • 604 B
JavaScript
import { StickyEvent } from './StickyEvent.js';
/**
* A sticky event that is fired right before a {@link Widget} gains a specific
* {@link FocusType | focus}. Not capturable by user listeners. If not captured
* by the widget, the widget will not gain the focus.
*
* Always check the focus type to avoid weird behaviour.
*/
export class FocusEvent extends StickyEvent {
constructor(focusType) {
super();
this.type = FocusEvent.type;
this.userCapturable = false;
this.focusType = focusType;
}
}
FocusEvent.type = 'focus';
//# sourceMappingURL=FocusEvent.js.map