EventInfo (utils)
@ckeditor/ckeditor5-utils/src/eventinfo
The event object passed to event callbacks. It is used to provide information about the event as well as a tool to manipulate it.
Filtering
Type parameters
-
TName : extends string = string
-
TReturn : unknown
Properties
-
The event name.
-
Removes the current callback from future interactions of this event.
-
path : Array<object>
module:utils/eventinfo~EventInfo#path
Path this event has followed. See
delegate
. -
return : undefined | TReturn
module:utils/eventinfo~EventInfo#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(); } );
-
The object that fired the event.
-
Stops the event emitter to call further callbacks for this event interaction.
Methods
-
constructor( source, name )
module:utils/eventinfo~EventInfo#constructor
Type parameters
TName : extends string = string
TReturn : unknown
Parameters
source : object
The emitter.
name : TName
The event name.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.