# utils/dom/getlayoutparentelement

module

<a id="functions">

## Functions

<a id="function-getLayoutParentElement">

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

Returns the parent element in the **flattened tree**, the one the browser lays out and paints.

The layout-aware counterpart of [`getParentElement`](module_utils_dom_getparentelement.md#function-getParentElement), and the element-only form of [`getLayoutParentNode`](module_utils_dom_getlayoutparentnode.md#function-getLayoutParentNode) – see that one for why the flattened tree and the node tree disagree for slotted content, and for when to prefer which.

Use it to walk outwards over the elements that lay a node out: its scrollable ancestors, its clipping ancestors. Works for open and closed roots alike, and falls back to the node tree for slotted content inside a closed root, whose slot the DOM standard does not expose.

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

#### Parameters

* `node: Node`

  The node to get the layout parent element of.

#### Returns

* `Element | null`

---

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