---
id: fast-foundation.composedparent
title: composedParent() function
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [composedParent](./fast-foundation.composedparent.md)

## composedParent() function

Retrieves the "composed parent" element of a node, ignoring DOM tree boundaries. When the parent of a node is a shadow-root, it will return the host element of the shadow root. Otherwise it will return the parent node or null if no parent node exists.

<b>Signature:</b>

```typescript
export declare function composedParent<T extends HTMLElement>(element: T): HTMLElement | null;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  element | T | The element for which to retrieve the composed parent |

<b>Returns:</b>

HTMLElement \| null
