# utils/dom/getparentelement

module

<a id="functions">

## Functions

<a id="function-getParentElement">

### `getParentElement( node ) → Element | null`

Returns the parent element of the given node, crossing shadow boundaries.

The shadow-aware replacement for `Node#parentElement`, which is `null` for a node sitting directly in a `ShadowRoot` and so stops an outward walk at the boundary. Works for open and closed roots alike.

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

#### Parameters

* `node: Node`

  The node to get the parent element of.

#### Returns

* `Element | null`

---

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