# utils/dom/getlayoutparentnode

module

<a id="functions">

## Functions

<a id="function-getLayoutParentNode">

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

Returns the node one step up the **flattened tree**, the one the browser lays out and paints.

The layout-aware counterpart of [`getParentNode`](module_utils_dom_getparentnode.md#function-getParentNode), which walks the node tree. The two agree everywhere except for slotted content: assigning a node to a `<slot>` does not move it, so it stays a child of the host in the node tree while rendering inside the slot. A node-tree walk out of such a node therefore leaves into the light DOM and skips every element of the shadow tree that actually lays it out.

Use this one for questions about geometry – what scrolls a node, what clips it, what it renders inside – and [`getParentNode`](module_utils_dom_getparentnode.md#function-getParentNode) for questions about structure, such as what a node is a descendant of for the purposes of DOM manipulation or event retargeting. Both cross shadow boundaries and both work for open and closed roots alike.

**Note**: `Element#assignedSlot` is `null` when the slot lives in a _closed_ shadow root, which the DOM standard does not expose. For slotted content inside a closed root this falls back to the node tree and answers exactly as [`getParentNode`](module_utils_dom_getparentnode.md#function-getParentNode) does.

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

#### Parameters

* `node: Node`

  The node to step up from.

#### Returns

* `ParentNode | null`

---

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