LWT JavaScript API
    Preparing search index...
    • Execute an XPath expression and return matching elements as an array. Supports pipe-separated multiple expressions (e.g., "//div | //span").

      Parameters

      • expression: string

        XPath expression to evaluate

      • context: Node = document

        Context node for evaluation (defaults to document)

      Returns HTMLElement[]

      Array of matched HTMLElements