This is a prerelease version of FAST (3.0.0-rc.1).

@microsoft/fast-element > 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 exists 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