banira
    Preparing search index...

    Interface MountContext

    Interface representing the context after mounting a component in JSDOM

    MountContext

    interface MountContext {
        document: Document;
        jsdom: JSDOM;
        window: DOMWindow;
        query(selector: string): Element | null;
        queryAll(selector: string): Element[];
    }
    Index

    Properties

    Methods

    Properties

    document: Document

    The JSDOM document object

    jsdom: JSDOM

    The JSDOM instance

    window: DOMWindow

    The JSDOM window object

    Methods

    • Shadow-piercing querySelector: returns the first element matching selector anywhere in the mounted tree, descending into open shadow roots — so tests need not hand-walk shadowRoot. Returns null if none match.

      Parameters

      • selector: string

      Returns Element | null

    • Shadow-piercing querySelectorAll: every match across open shadow boundaries, in document order.

      Parameters

      • selector: string

      Returns Element[]