up.fragment up.fragment.contains(root, query)
JavaScript function

This feature is experimental. Please share your experiences so we know what to keep or change.

Returns whether the given root matches or contains the given selector or element.

Will always return false if the two elements are on different layers.


Parameters

root
required
Type: Element | Document
query
required

The selector or element to look for.

Type: string | Element

Return value

Whether the root contains the given element or selector.

Type: boolean