# table/tablescroll/watchers

module

<a id="functions">

## Functions

<a id="function-watchRootsScroll">

### `watchRootsScroll( view, onScroll ) → () => void` _(internal)_

Listens to `scroll` on every editing root and calls `onScroll` for scrolls happening anywhere inside them.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-table/src/tablescroll/watchers.ts#L121)

#### Parameters

* `view: EditingView`
* `onScroll: ( evt: EventInfo, domEvent: Event ) => void`

#### Returns

* `() => void`

<a id="function-watchRootsWidthResize">

### `watchRootsWidthResize( view, onResize ) → () => void` _(internal)_

Observes the DOM width of every editing root and calls `onResize` whenever any of them changes width. Height-only changes are ignored, since only a root's width can make a table overflow it.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-table/src/tablescroll/watchers.ts#L85)

#### Parameters

* `view: EditingView`
* `onResize: () => void`

#### Returns

* `() => void`

<a id="function-watchTableModelElements">

### `watchTableModelElements( model ) → Collection<ModelElement>` _(internal)_

Creates a live collection of all `table` model elements present in the document and keeps it up to date as tables are inserted, moved, or removed.

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

#### Parameters

* `model: Model`

#### Returns

* `Collection<ModelElement>`

---

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