# EventInfo

class

The event object passed to event callbacks. It is used to provide information about the event as well as a tool to manipulate it.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/eventinfo.ts#L16)

<a id="type-parameters">

## Type parameters

### `TName: extends string = string`

### `TReturn: unknown`

<a id="properties">

## Properties

<a id="member-name">

### `name: TName` _(readonly)_

The event name.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/eventinfo.ts#L25)

<a id="member-off">

### `off: () => void` _(readonly)_

Removes the current callback from future interactions of this event.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/eventinfo.ts#L40)

<a id="member-path">

### `path: Array<object>`

Path this event has followed. See [`delegate`](module_utils_emittermixin-Emitter.md#function-delegate).

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/eventinfo.ts#L30)

<a id="member-return">

### `return: TReturn | undefined`

The value which will be returned by [`fire`](module_utils_emittermixin-Emitter.md#function-fire).

It's `undefined` by default and can be changed by an event listener:

```typescript
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();
} );
```

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/eventinfo.ts#L58)

<a id="member-source">

### `source: object` _(readonly)_

The object that fired the event.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/eventinfo.ts#L20)

<a id="member-stop">

### `stop: () => void` _(readonly)_

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

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/eventinfo.ts#L35)

<a id="methods">

## Methods

<a id="function-constructor">

### `constructor( source, name )`

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/eventinfo.ts#L64)

#### Type parameters

* * `TName: extends string = string`
  * `TReturn: unknown`

#### Parameters

* `source: object`

  The emitter.

* `name: TName`

  The event name.

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
