# ListWalker

class

Document list blocks iterator.

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

<a id="properties">

## Properties

<a id="member-_higherIndent">

### `_higherIndent: boolean` _(private)_

Whether blocks with a higher indent level than the start block should be included in the result.

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

<a id="member-_includeSelf">

### `_includeSelf: boolean` _(private)_

Whether start block should be included in the result (if it's matching other criteria).

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

<a id="member-_isForward">

### `_isForward: boolean` _(private)_

The iterating direction.

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

<a id="member-_lowerIndent">

### `_lowerIndent: boolean` _(private)_

Whether blocks with a lower indent level than the start block should be included in the result.

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

<a id="member-_referenceIndent">

### `_referenceIndent: number` _(private)_

The reference indent. Initialized by the indent of the start block.

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

<a id="member-_sameAttributes">

### `_sameAttributes: Array<string>` _(private)_

Additional attributes that must be the same for each block.

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

<a id="member-_sameIndent">

### `_sameIndent: boolean` _(private)_

Whether blocks with the same indent level as the start block should be included in the result.

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

<a id="member-_startElement">

### `_startElement: ModelNode` _(private)_

The start list item block element.

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

<a id="methods">

## Methods

<a id="function-constructor">

### `constructor( startElement, options )`

Creates a document list iterator.

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

#### Parameters

* `startElement: ModelNode`

  The start list item block element.

* `options: ListWalkerOptions`

<a id="function-Symbol.iterator">

### `Symbol.iterator() → Iterator<ListElement>`

Iterable interface.

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

#### Returns

* `Iterator<ListElement>`

<a id="function-_getStartNode">

### `_getStartNode() → ModelNode | null` _(private)_

Returns the model element to start iterating.

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

#### Returns

* `ModelNode | null`

#### Static methods

<a id="static-function-first">

### `first( startElement, options ) → ListElement | null` _(static)_

Performs only first step of iteration and returns the result.

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

#### Parameters

* `startElement: ModelNode`

  The start list item block element.

* `options: ListWalkerOptions`

#### Returns

* `ListElement | null`

---

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