src/domains/input

This module provides a direct mapping of CDP events and commands for v1.3 (stable) of the Input Domain.

Procs

proc cancelDragging(tab: Tab): owned(Future[void]) {....stackTrace: false,
    raises: [Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}

Input.cancelDragging

Cancels any active dragging in the page.

proc dispatchKeyEvent(tab: Tab; type: string): owned(Future[void]) {.
    ...stackTrace: false, raises: [Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc dispatchKeyEvent(tab: Tab; type: string; params: JsonNode): owned(
    Future[void]) {....stackTrace: false, raises: [Exception], tags: [RootEffect,
    WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}

Input.dispatchKeyEvent

Dispatches a key event to the page.

proc dispatchMouseEvent(tab: Tab; type: string; x: float | int; y: float | int): owned(
    Future[void]) {....stackTrace: false.}
proc dispatchMouseEvent(tab: Tab; type: string; x: float | int; y: float | int;
                        params: JsonNode): owned(Future[void]) {.
    ...stackTrace: false.}

Input.dispatchMouseEvent

Dispatches a mouse event to the page.

proc dispatchTouchEvent(tab: Tab; type: string; touchPoints: seq[JsonNode]): owned(
    Future[void]) {....stackTrace: false, raises: [Exception], tags: [RootEffect,
    WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc dispatchTouchEvent(tab: Tab; type: string; touchPoints: seq[JsonNode];
                        params: JsonNode): owned(Future[void]) {.
    ...stackTrace: false, raises: [Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}

Input.dispatchTouchEvent

Dispatches a touch event to the page.

proc setIgnoreInputEvents(tab: Tab; ignore: bool): owned(Future[void]) {.
    ...stackTrace: false, raises: [Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}

Input.setIgnoreInputEvents

Ignores input events (useful while debugging).