Skip to content

Documentation / @ripl/core / EVENT_WILDCARD

Variable: EVENT_WILDCARD ​

const EVENT_WILDCARD: "*" = '*'

Defined in: packages/core/src/core/event-bus.ts:35

The wildcard event type. Subscribing to it with EventBus.on receives every event emitted on the bus, whatever its type — including custom types a subclass never declares in EventBus.$events. Because events bubble, a wildcard subscription on a Group or Scene observes its whole subtree, with each event's target still identifying the bus it was originally emitted on.

A wildcard subscription is deliberately invisible to EventBus.has, which reports only listeners registered for a concrete type. Interaction events are dispatched to elements that has the event, so observing a bus never turns it into a pointer-event target.