# DifferItemRoot

interface

A single diff item for a changed root.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/model/differ.ts#L1762)

<a id="properties">

## Properties

<a id="member-attributes">

### `attributes?: Record<string, object>`

Keeps all attribute changes that happened on the root.

The keys are keys of the changed attributes. The values are objects containing the attribute value before the change (`oldValue`) and after the change (`newValue`).

Note, that if the root state changed (`state` is set), then `attributes` property will not be set. All attributes should be handled together with the root being attached or detached.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/model/differ.ts#L1783)

<a id="member-name">

### `name: string`

Name of the changed root.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/model/differ.ts#L1767)

<a id="member-state">

### `state?: 'attached' | 'detached'`

Set accordingly if the root got attached or detached. Otherwise, not set.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/model/differ.ts#L1772)

---

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