Trilium Frontend API
    Preparing search index...

    Class EventInfo<TName, TReturn>

    The event object passed to 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
    Index

    Constructors

    Properties

    Constructors

    • Type Parameters

      • TName extends string = string
      • TReturn = unknown

      Parameters

      • source: object

        The emitter.

      • name: TName

        The event name.

      Returns EventInfo<TName, TReturn>

    Properties

    name: TName

    The event name.

    off: { called?: boolean; (): void }

    Removes the current callback from future interactions of this event.

    path: object[]

    Path this event has followed. See module:utils/emittermixin~Emitter#delegate.

    return: TReturn

    The value which will be returned by module:utils/emittermixin~Emitter#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

    The object that fired the event.

    stop: { called?: boolean; (): void }

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