Class

BubblingEventInfo (engine/view/observer)

@ckeditor/ckeditor5-engine/src/view/observer/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.

Filtering

Type parameters

Properties

  • readonly

    currentTarget : null | Node | Document

    The current bubbling target.

  • readonly

    eventPhase : EventPhase

    The current event phase.

  • readonly inherited

    name : TName

    The event name.

  • readonly inherited

    off : () => void

    Removes the current callback from future interactions of this event.

  • inherited

    path : Array<object>

    Path this event has followed. See delegate.

  • inherited

    return : undefined | TReturn

    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();
    } );
    
  • readonly inherited

    source : object

    The object that fired the event.

  • readonly

    startRange : Range

    The view range that the bubbling should start from.

  • readonly inherited

    stop : () => void

    Stops the event emitter to call further callbacks for this event interaction.

  • private

    _currentTarget : null | Node | Document

    The current bubbling target.

  • private

    _eventPhase : EventPhase

    The current event phase.

Methods

  • constructor( source, name, startRange )

    Type parameters

    TName : extends string = string
    TReturn : unknown

    Parameters

    source : object

    The emitter.

    name : TName

    The event name.

    startRange : Range

    The view range that the bubbling should start from.