pseudo-dom
    Preparing search index...

    Variable simulate

    simulate: {
        click: (element: any, init?: { [option: string]: any }) => boolean;
        keyPress: (
            element: any,
            key: string,
            init?: { [option: string]: any },
        ) => boolean;
    }

    Type Declaration

    • click: (element: any, init?: { [option: string]: any }) => boolean

      Click an element the way a user does: pointerdown and mousedown, then the focus moves to the nearest element which can have it (or is taken away from the one which had it) unless mousedown was cancelled, then pointerup, mouseup and finally click. Every event is trusted and has the options the browser gives it. A disabled element gets nothing.

    • keyPress: (element: any, key: string, init?: { [option: string]: any }) => boolean

      Press and release a key on an element (the element which has the focus, or one given): keydown and then keyup.