BubblingEventInfo
class
The event object passed to bubbling event callbacks. It is used to provide information about the event as well as a tool to manipulate it.
Type parameters
TName : extends string = stringTReturn : unknown
Properties
currentTarget : null | ViewNode | ViewDocumentreadonlymodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#currentTargetThe current bubbling target.
eventPhase : BubblingEventPhasereadonlymodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#eventPhaseThe current event phase.
name : TNamereadonlyinheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#nameThe event name.
off : () => voidreadonlyinheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#offRemoves the current callback from future interactions of this event.
path : Array<object>inheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#pathPath this event has followed. See
delegate.return : undefined | TReturninheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#returnThe value which will be returned by
fire.It's
undefinedby default and can be changed by an event listener:dataController.fire( 'getSelectedContent', ( evt ) => { // This listener will make `dataController.fire( 'getSelectedContent' )` // always return an empty DocumentFragment. evt.return = new DocumentFragment(); // Make sure no other listeners are executed. evt.stop(); } );Copy codesource : objectreadonlyinheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#sourceThe object that fired the event.
startRange : ViewRangereadonlymodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#startRangeThe view range that the bubbling should start from.
stop : () => voidreadonlyinheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#stopStops the event emitter to call further callbacks for this event interaction.
_currentTarget : null | ViewNode | ViewDocumentprivatemodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#_currentTargetThe current bubbling target.
_eventPhase : BubblingEventPhaseprivatemodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#_eventPhaseThe current event phase.
Methods
constructor( source, name, startRange )module:engine/view/observer/bubblingeventinfo~BubblingEventInfo#constructorType parameters
TName : extends string = stringTReturn : unknown
Parameters
source : objectThe emitter.
name : TNameThe event name.
startRange : ViewRangeThe view range that the bubbling should start from.