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 = string
-
TReturn : unknown
Properties
-
currentTarget : null | ViewNode | ViewDocument
readonlymodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#currentTarget
The current bubbling target.
-
eventPhase : BubblingEventPhase
readonlymodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#eventPhase
The current event phase.
-
name : TName
readonlyinheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#name
The event name.
-
off : () => void
readonlyinheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#off
Removes the current callback from future interactions of this event.
-
path : Array<object>
inheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#path
Path this event has followed. See
delegate
. -
return : undefined | TReturn
inheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#return
The value which will be returned by
fire
.It's
undefined
by 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(); } );
-
source : object
readonlyinheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#source
The object that fired the event.
-
startRange : ViewRange
readonlymodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#startRange
The view range that the bubbling should start from.
-
stop : () => void
readonlyinheritedmodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#stop
Stops the event emitter to call further callbacks for this event interaction.
-
_currentTarget : null | ViewNode | ViewDocument
privatemodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#_currentTarget
The current bubbling target.
-
_eventPhase : BubblingEventPhase
privatemodule:engine/view/observer/bubblingeventinfo~BubblingEventInfo#_eventPhase
The current event phase.
Methods
-
constructor( source, name, startRange )
module:engine/view/observer/bubblingeventinfo~BubblingEventInfo#constructor
Type parameters
TName : extends string = string
TReturn : unknown
Parameters
source : object
The emitter.
name : TName
The event name.
startRange : ViewRange
The view range that the bubbling should start from.