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

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [composedContains](./fast-foundation.composedcontains.md)

## composedContains() function

Determines if the reference element contains the test element in a "composed" DOM tree that ignores shadow DOM boundaries.

Returns true of the test element is a descendent of the reference, or exist in a shadow DOM that is a logical descendent of the reference. Otherwise returns false.

<b>Signature:</b>

```typescript
export declare function composedContains(reference: HTMLElement, test: HTMLElement): boolean;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  reference | HTMLElement | The element to test for containment against. |
|  test | HTMLElement | The element being tested for containment. |

<b>Returns:</b>

boolean
