@umbraco-cms/backoffice
    Preparing search index...

    Function queryParentRoots

    • Traverses the roots and returns the first match. The minRoots parameter indicates how many roots should be traversed before we started matching with the query.

      Type Parameters

      • T

      Parameters

      • $elem: Element

        The element to start the traversal from.

      • query: string

        The selector to match against.

      • OptionalminRoots: number = 0

        The minimum number of roots to traverse before matching.

      • Optionalroots: number = 0

        The number of roots already traversed.

      Returns T | null

      The first matching element, or null if none was found.