Skip to content

Documentation / @ripl/core / Event

Class: Event<TData>

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

An event object carrying type, data, target reference, and propagation control.

Type Parameters

Type ParameterDefault type
TDataundefined

Constructors

Constructor

new Event<TData>(type, target, options?): Event<TData>

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

Parameters

ParameterType
typestring
targetEventBus<any>
options?EventOptions<TData>

Returns

Event<TData>

Properties

PropertyModifierTypeDescriptionDefined in
datareadonlyTDataThe payload carried by this event.packages/core/src/core/event-bus.ts:52
targetreadonlyEventBus<any>The EventBus on which the event was originally emitted.packages/core/src/core/event-bus.ts:57
timestampreadonlynumberThe high-resolution timestamp at which the event was created.packages/core/src/core/event-bus.ts:54
typereadonlystringThe event type name.packages/core/src/core/event-bus.ts:50

Accessors

bubbles

Get Signature

get bubbles(): boolean

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

Whether this event will continue to bubble up the parent chain.

Returns

boolean

Methods

stopPropagation()

stopPropagation(): void

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

Prevents this event from bubbling further up the parent chain.

Returns

void