Join us online - 19th of November
Save your spot
For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface XPathExpression

This interface is a compiled XPath expression that can be evaluated on a document or specific node to return information from its DOM tree.

MDN Reference

interface XPathExpression {
    evaluate(
        contextNode: Node,
        type?: number,
        result?: XPathResult | null,
    ): XPathResult;
}
Index
  • The evaluate() method of the XPathExpression interface executes an XPath expression on the given node or document and returns an XPathResult.

    MDN Reference

    Parameters

    Returns XPathResult

Was this helpful?