Edit this page

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

This feature is experimental. It may be changed or removed in a future version.

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 ElementorDocument
query stringorElement

The selector or element to look for.

Return value

boolean