type FlagTarget = Element | Document | string; interface Event { /** Tells the browser that the default action should not be taken. The event will still continue to propagate up the tree. See Event.preventDefault() @see https://imba.io/events/event-modifiers#core-prevent */ αprevent(): void; /** Stops the event from propagating up the tree. Event listeners for the same event on nodes further up the tree will not be triggered. See Event.stopPropagation() */ αstop(): void; /** Prevents default action & stops event from bubbling. */ αtrap(): void; /** * Indicates that the listeners should be invoked at most once. The listener will automatically be removed when invoked. */ αonce(): void; /** * Indicating that events of this type should be dispatched to the registered listener before being dispatched to tags deeper in the DOM tree. */ αcapture(): void; /** * Indicates that the listener will never call preventDefault(). If a passive listener does call preventDefault(), the user agent will do nothing other than generate a console warning. This is useful for optimal performance while scrolling etc. * * @summary indicates that the listener will never call preventDefault() */ αpassive(): void; /** * By default, Imba will re-render all scheduled tags after any *handled* event. So, Imba won't re-render your application if you click an element that has no attached handlers, but if you've added a `@click` listener somewhere in the chain of elements, `imba.commit` will automatically be called after the event has been handled. This is usually what you want, but it is useful to be able to override this, especially when dealing with `@scroll` and other events that might fire rapidly. #### Syntax ```imba # Will only trigger when intersection ratio increases
# Will only trigger when element is more than 50% visible
``` * @summary Don't trigger imba.commit from this event handler */ αsilent(): void; /** * Calls `imba.commit` when event is handled. This will happen by default for all events with a handler (so `.commit` is superflous in the case of `<@event.commit=handler>`). There are cases however where you just want to make sure the interface is updated when certain events are triggered, without actually doing anything in response to the event. Ie. if you have an audio-element and you render something based on the `playState` of said element, you might want to commit for certain events: `