# utils/dom/getparentnode

module

<a id="functions">

## Functions

<a id="function-getParentNode">

### `getParentNode( node ) → ParentNode | null`

Returns the node one step up the composed tree, crossing shadow boundaries.

The shadow-aware replacement for `Node#parentNode`, and the primitive for walking from a node outwards to the document. It steps over any node, so such a walk visits the `ShadowRoot` nodes on the way and reaches the `Document` at the top – to walk elements only, use [`getParentElement`](module_utils_dom_getparentelement.md#function-getParentElement). Works for open and closed roots alike.

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

#### Parameters

* `node: Node`

  The node to step up from.

#### Returns

* `ParentNode | null`

---

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