# utils/dom/isshadowhostof

module

<a id="functions">

## Functions

<a id="function-isShadowHostOf">

### `isShadowHostOf( node, shadowRoots ) → boolean`

Checks whether the given node is the host of any of the given shadow roots.

Answers "is this a stand-in for something inside one of these roots, rather than the real thing?". A DOM API that cannot reach into a shadow tree reports its host in place of the node inside it – most commonly an event target, retargeted for a listener that does not live in that tree. Works for open and closed roots alike.

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

#### Parameters

* `node: EventTarget | null`

  The node to test.

* `shadowRoots: Iterable<ShadowRoot>`

  The shadow roots to test against.

#### Returns

* `boolean`

---

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