@microsoft/fast-foundation > composedContains

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.

Signature:

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.

Returns:

boolean