input

package
v0.0.0-...-fe04f09 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 9 Imported by: 105

Documentation

Overview

Package input provides the Chrome DevTools Protocol commands, types, and events for the Input domain.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandDispatchDragEvent          = "Input.dispatchDragEvent"
	CommandDispatchKeyEvent           = "Input.dispatchKeyEvent"
	CommandInsertText                 = "Input.insertText"
	CommandImeSetComposition          = "Input.imeSetComposition"
	CommandDispatchMouseEvent         = "Input.dispatchMouseEvent"
	CommandDispatchTouchEvent         = "Input.dispatchTouchEvent"
	CommandCancelDragging             = "Input.cancelDragging"
	CommandEmulateTouchFromMouseEvent = "Input.emulateTouchFromMouseEvent"
	CommandSetIgnoreInputEvents       = "Input.setIgnoreInputEvents"
	CommandSetInterceptDrags          = "Input.setInterceptDrags"
	CommandSynthesizePinchGesture     = "Input.synthesizePinchGesture"
	CommandSynthesizeScrollGesture    = "Input.synthesizeScrollGesture"
	CommandSynthesizeTapGesture       = "Input.synthesizeTapGesture"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelDraggingParams

type CancelDraggingParams struct{}

CancelDraggingParams cancels any active dragging in the page.

func CancelDragging

func CancelDragging() *CancelDraggingParams

CancelDragging cancels any active dragging in the page.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-cancelDragging

func (*CancelDraggingParams) Do

func (p *CancelDraggingParams) Do(ctx context.Context) (err error)

Do executes Input.cancelDragging against the provided context.

func (CancelDraggingParams) MarshalEasyJSON

func (v CancelDraggingParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CancelDraggingParams) MarshalJSON

func (v CancelDraggingParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CancelDraggingParams) UnmarshalEasyJSON

func (v *CancelDraggingParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CancelDraggingParams) UnmarshalJSON

func (v *CancelDraggingParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DispatchDragEventParams

type DispatchDragEventParams struct {
	Type      DispatchDragEventType `json:"type"` // Type of the drag event.
	X         float64               `json:"x"`    // X coordinate of the event relative to the main frame's viewport in CSS pixels.
	Y         float64               `json:"y"`    // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
	Data      *DragData             `json:"data"`
	Modifiers Modifier              `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
}

DispatchDragEventParams dispatches a drag event into the page.

func DispatchDragEvent

func DispatchDragEvent(typeVal DispatchDragEventType, x float64, y float64, data *DragData) *DispatchDragEventParams

DispatchDragEvent dispatches a drag event into the page.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchDragEvent

parameters:

type - Type of the drag event.
x - X coordinate of the event relative to the main frame's viewport in CSS pixels.
y - Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
data

func (*DispatchDragEventParams) Do

func (p *DispatchDragEventParams) Do(ctx context.Context) (err error)

Do executes Input.dispatchDragEvent against the provided context.

func (DispatchDragEventParams) MarshalEasyJSON

func (v DispatchDragEventParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DispatchDragEventParams) MarshalJSON

func (v DispatchDragEventParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DispatchDragEventParams) UnmarshalEasyJSON

func (v *DispatchDragEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DispatchDragEventParams) UnmarshalJSON

func (v *DispatchDragEventParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (DispatchDragEventParams) WithModifiers

func (p DispatchDragEventParams) WithModifiers(modifiers Modifier) *DispatchDragEventParams

WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).

type DispatchDragEventType

type DispatchDragEventType string

DispatchDragEventType type of the drag event.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchDragEvent

const (
	DragEnter  DispatchDragEventType = "dragEnter"
	DragOver   DispatchDragEventType = "dragOver"
	Drop       DispatchDragEventType = "drop"
	DragCancel DispatchDragEventType = "dragCancel"
)

DispatchDragEventType values.

func (DispatchDragEventType) MarshalEasyJSON

func (t DispatchDragEventType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (DispatchDragEventType) MarshalJSON

func (t DispatchDragEventType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (DispatchDragEventType) String

func (t DispatchDragEventType) String() string

String returns the DispatchDragEventType as string value.

func (*DispatchDragEventType) UnmarshalEasyJSON

func (t *DispatchDragEventType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*DispatchDragEventType) UnmarshalJSON

func (t *DispatchDragEventType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type DispatchKeyEventParams

type DispatchKeyEventParams struct {
	Type                  KeyType         `json:"type"`                            // Type of the key event.
	Modifiers             Modifier        `json:"modifiers"`                       // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Timestamp             *TimeSinceEpoch `json:"timestamp,omitempty"`             // Time at which the event occurred.
	Text                  string          `json:"text,omitempty"`                  // Text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp and rawKeyDown events (default: "")
	UnmodifiedText        string          `json:"unmodifiedText,omitempty"`        // Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").
	KeyIdentifier         string          `json:"keyIdentifier,omitempty"`         // Unique key identifier (e.g., 'U+0041') (default: "").
	Code                  string          `json:"code,omitempty"`                  // Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
	Key                   string          `json:"key,omitempty"`                   // Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
	WindowsVirtualKeyCode int64           `json:"windowsVirtualKeyCode,omitempty"` // Windows virtual key code (default: 0).
	NativeVirtualKeyCode  int64           `json:"nativeVirtualKeyCode,omitempty"`  // Native virtual key code (default: 0).
	AutoRepeat            bool            `json:"autoRepeat"`                      // Whether the event was generated from auto repeat (default: false).
	IsKeypad              bool            `json:"isKeypad"`                        // Whether the event was generated from the keypad (default: false).
	IsSystemKey           bool            `json:"isSystemKey"`                     // Whether the event was a system key event (default: false).
	Location              int64           `json:"location,omitempty"`              // Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
	Commands              []string        `json:"commands,omitempty"`              // Editing commands to send with the key event (e.g., 'selectAll') (default: []). These are related to but not equal the command names used in document.execCommand and NSStandardKeyBindingResponding. See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
}

DispatchKeyEventParams dispatches a key event to the page.

func DispatchKeyEvent

func DispatchKeyEvent(typeVal KeyType) *DispatchKeyEventParams

DispatchKeyEvent dispatches a key event to the page.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent

parameters:

type - Type of the key event.

func (*DispatchKeyEventParams) Do

func (p *DispatchKeyEventParams) Do(ctx context.Context) (err error)

Do executes Input.dispatchKeyEvent against the provided context.

func (DispatchKeyEventParams) MarshalEasyJSON

func (v DispatchKeyEventParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DispatchKeyEventParams) MarshalJSON

func (v DispatchKeyEventParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DispatchKeyEventParams) UnmarshalEasyJSON

func (v *DispatchKeyEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DispatchKeyEventParams) UnmarshalJSON

func (v *DispatchKeyEventParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (DispatchKeyEventParams) WithAutoRepeat

func (p DispatchKeyEventParams) WithAutoRepeat(autoRepeat bool) *DispatchKeyEventParams

WithAutoRepeat whether the event was generated from auto repeat (default: false).

func (DispatchKeyEventParams) WithCode

WithCode unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").

func (DispatchKeyEventParams) WithCommands

func (p DispatchKeyEventParams) WithCommands(commands []string) *DispatchKeyEventParams

WithCommands editing commands to send with the key event (e.g., 'selectAll') (default: []). These are related to but not equal the command names used in document.execCommand and NSStandardKeyBindingResponding. See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.

func (DispatchKeyEventParams) WithIsKeypad

func (p DispatchKeyEventParams) WithIsKeypad(isKeypad bool) *DispatchKeyEventParams

WithIsKeypad whether the event was generated from the keypad (default: false).

func (DispatchKeyEventParams) WithIsSystemKey

func (p DispatchKeyEventParams) WithIsSystemKey(isSystemKey bool) *DispatchKeyEventParams

WithIsSystemKey whether the event was a system key event (default: false).

func (DispatchKeyEventParams) WithKey

WithKey unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").

func (DispatchKeyEventParams) WithKeyIdentifier

func (p DispatchKeyEventParams) WithKeyIdentifier(keyIdentifier string) *DispatchKeyEventParams

WithKeyIdentifier unique key identifier (e.g., 'U+0041') (default: "").

func (DispatchKeyEventParams) WithLocation

func (p DispatchKeyEventParams) WithLocation(location int64) *DispatchKeyEventParams

WithLocation whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).

func (DispatchKeyEventParams) WithModifiers

func (p DispatchKeyEventParams) WithModifiers(modifiers Modifier) *DispatchKeyEventParams

WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).

func (DispatchKeyEventParams) WithNativeVirtualKeyCode

func (p DispatchKeyEventParams) WithNativeVirtualKeyCode(nativeVirtualKeyCode int64) *DispatchKeyEventParams

WithNativeVirtualKeyCode native virtual key code (default: 0).

func (DispatchKeyEventParams) WithText

WithText text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp and rawKeyDown events (default: "").

func (DispatchKeyEventParams) WithTimestamp

func (p DispatchKeyEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchKeyEventParams

WithTimestamp time at which the event occurred.

func (DispatchKeyEventParams) WithUnmodifiedText

func (p DispatchKeyEventParams) WithUnmodifiedText(unmodifiedText string) *DispatchKeyEventParams

WithUnmodifiedText text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").

func (DispatchKeyEventParams) WithWindowsVirtualKeyCode

func (p DispatchKeyEventParams) WithWindowsVirtualKeyCode(windowsVirtualKeyCode int64) *DispatchKeyEventParams

WithWindowsVirtualKeyCode windows virtual key code (default: 0).

type DispatchMouseEventParams

type DispatchMouseEventParams struct {
	Type               MouseType                     `json:"type"`                         // Type of the mouse event.
	X                  float64                       `json:"x"`                            // X coordinate of the event relative to the main frame's viewport in CSS pixels.
	Y                  float64                       `json:"y"`                            // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
	Modifiers          Modifier                      `json:"modifiers"`                    // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Timestamp          *TimeSinceEpoch               `json:"timestamp,omitempty"`          // Time at which the event occurred.
	Button             MouseButton                   `json:"button,omitempty"`             // Mouse button (default: "none").
	Buttons            int64                         `json:"buttons,omitempty"`            // A number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
	ClickCount         int64                         `json:"clickCount,omitempty"`         // Number of times the mouse button was clicked (default: 0).
	Force              float64                       `json:"force,omitempty"`              // The normalized pressure, which has a range of [0,1] (default: 0).
	TangentialPressure float64                       `json:"tangentialPressure,omitempty"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
	TiltX              float64                       `json:"tiltX,omitempty"`              // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
	TiltY              float64                       `json:"tiltY,omitempty"`              // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
	Twist              int64                         `json:"twist,omitempty"`              // The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
	DeltaX             float64                       `json:"deltaX"`                       // X delta in CSS pixels for mouse wheel event (default: 0).
	DeltaY             float64                       `json:"deltaY"`                       // Y delta in CSS pixels for mouse wheel event (default: 0).
	PointerType        DispatchMouseEventPointerType `json:"pointerType,omitempty"`        // Pointer type (default: "mouse").
}

DispatchMouseEventParams dispatches a mouse event to the page.

func DispatchMouseEvent

func DispatchMouseEvent(typeVal MouseType, x float64, y float64) *DispatchMouseEventParams

DispatchMouseEvent dispatches a mouse event to the page.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent

parameters:

type - Type of the mouse event.
x - X coordinate of the event relative to the main frame's viewport in CSS pixels.
y - Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.

func (*DispatchMouseEventParams) Do

func (p *DispatchMouseEventParams) Do(ctx context.Context) (err error)

Do executes Input.dispatchMouseEvent against the provided context.

func (DispatchMouseEventParams) MarshalEasyJSON

func (v DispatchMouseEventParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DispatchMouseEventParams) MarshalJSON

func (v DispatchMouseEventParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DispatchMouseEventParams) UnmarshalEasyJSON

func (v *DispatchMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DispatchMouseEventParams) UnmarshalJSON

func (v *DispatchMouseEventParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (DispatchMouseEventParams) WithButton

WithButton mouse button (default: "none").

func (DispatchMouseEventParams) WithButtons

WithButtons a number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.

func (DispatchMouseEventParams) WithClickCount

func (p DispatchMouseEventParams) WithClickCount(clickCount int64) *DispatchMouseEventParams

WithClickCount number of times the mouse button was clicked (default: 0).

func (DispatchMouseEventParams) WithDeltaX

WithDeltaX X delta in CSS pixels for mouse wheel event (default: 0).

func (DispatchMouseEventParams) WithDeltaY

WithDeltaY Y delta in CSS pixels for mouse wheel event (default: 0).

func (DispatchMouseEventParams) WithForce

WithForce the normalized pressure, which has a range of [0,1] (default: 0).

func (DispatchMouseEventParams) WithModifiers

func (p DispatchMouseEventParams) WithModifiers(modifiers Modifier) *DispatchMouseEventParams

WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).

func (DispatchMouseEventParams) WithPointerType

WithPointerType pointer type (default: "mouse").

func (DispatchMouseEventParams) WithTangentialPressure

func (p DispatchMouseEventParams) WithTangentialPressure(tangentialPressure float64) *DispatchMouseEventParams

WithTangentialPressure the normalized tangential pressure, which has a range of [-1,1] (default: 0).

func (DispatchMouseEventParams) WithTiltX

WithTiltX the plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).

func (DispatchMouseEventParams) WithTiltY

WithTiltY the plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).

func (DispatchMouseEventParams) WithTimestamp

WithTimestamp time at which the event occurred.

func (DispatchMouseEventParams) WithTwist

WithTwist the clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).

type DispatchMouseEventPointerType

type DispatchMouseEventPointerType string

DispatchMouseEventPointerType pointer type (default: "mouse").

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent

const (
	Mouse DispatchMouseEventPointerType = "mouse"
	Pen   DispatchMouseEventPointerType = "pen"
)

DispatchMouseEventPointerType values.

func (DispatchMouseEventPointerType) MarshalEasyJSON

func (t DispatchMouseEventPointerType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (DispatchMouseEventPointerType) MarshalJSON

func (t DispatchMouseEventPointerType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (DispatchMouseEventPointerType) String

String returns the DispatchMouseEventPointerType as string value.

func (*DispatchMouseEventPointerType) UnmarshalEasyJSON

func (t *DispatchMouseEventPointerType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*DispatchMouseEventPointerType) UnmarshalJSON

func (t *DispatchMouseEventPointerType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type DispatchTouchEventParams

type DispatchTouchEventParams struct {
	Type        TouchType       `json:"type"`                // Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
	TouchPoints []*TouchPoint   `json:"touchPoints"`         // Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.
	Modifiers   Modifier        `json:"modifiers"`           // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Timestamp   *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred.
}

DispatchTouchEventParams dispatches a touch event to the page.

func DispatchTouchEvent

func DispatchTouchEvent(typeVal TouchType, touchPoints []*TouchPoint) *DispatchTouchEventParams

DispatchTouchEvent dispatches a touch event to the page.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchTouchEvent

parameters:

type - Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
touchPoints - Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.

func (*DispatchTouchEventParams) Do

func (p *DispatchTouchEventParams) Do(ctx context.Context) (err error)

Do executes Input.dispatchTouchEvent against the provided context.

func (DispatchTouchEventParams) MarshalEasyJSON

func (v DispatchTouchEventParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DispatchTouchEventParams) MarshalJSON

func (v DispatchTouchEventParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DispatchTouchEventParams) UnmarshalEasyJSON

func (v *DispatchTouchEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DispatchTouchEventParams) UnmarshalJSON

func (v *DispatchTouchEventParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (DispatchTouchEventParams) WithModifiers

func (p DispatchTouchEventParams) WithModifiers(modifiers Modifier) *DispatchTouchEventParams

WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).

func (DispatchTouchEventParams) WithTimestamp

WithTimestamp time at which the event occurred.

type DragData

type DragData struct {
	Items              []*DragDataItem `json:"items"`
	Files              []string        `json:"files,omitempty"`    // List of filenames that should be included when dropping
	DragOperationsMask int64           `json:"dragOperationsMask"` // Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16
}

DragData [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-DragData

func (DragData) MarshalEasyJSON

func (v DragData) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DragData) MarshalJSON

func (v DragData) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DragData) UnmarshalEasyJSON

func (v *DragData) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DragData) UnmarshalJSON

func (v *DragData) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DragDataItem

type DragDataItem struct {
	MimeType string `json:"mimeType"`          // Mime type of the dragged data.
	Data     string `json:"data"`              // Depending of the value of mimeType, it contains the dragged link, text, HTML markup or any other data.
	Title    string `json:"title,omitempty"`   // Title associated with a link. Only valid when mimeType == "text/uri-list".
	BaseURL  string `json:"baseURL,omitempty"` // Stores the base URL for the contained markup. Only valid when mimeType == "text/html".
}

DragDataItem [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-DragDataItem

func (DragDataItem) MarshalEasyJSON

func (v DragDataItem) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DragDataItem) MarshalJSON

func (v DragDataItem) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DragDataItem) UnmarshalEasyJSON

func (v *DragDataItem) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DragDataItem) UnmarshalJSON

func (v *DragDataItem) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EmulateTouchFromMouseEventParams

type EmulateTouchFromMouseEventParams struct {
	Type       MouseType       `json:"type"`                 // Type of the mouse event.
	X          int64           `json:"x"`                    // X coordinate of the mouse pointer in DIP.
	Y          int64           `json:"y"`                    // Y coordinate of the mouse pointer in DIP.
	Button     MouseButton     `json:"button"`               // Mouse button. Only "none", "left", "right" are supported.
	Timestamp  *TimeSinceEpoch `json:"timestamp,omitempty"`  // Time at which the event occurred (default: current time).
	DeltaX     float64         `json:"deltaX"`               // X delta in DIP for mouse wheel event (default: 0).
	DeltaY     float64         `json:"deltaY"`               // Y delta in DIP for mouse wheel event (default: 0).
	Modifiers  Modifier        `json:"modifiers"`            // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	ClickCount int64           `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0).
}

EmulateTouchFromMouseEventParams emulates touch event from the mouse event parameters.

func EmulateTouchFromMouseEvent

func EmulateTouchFromMouseEvent(typeVal MouseType, x int64, y int64, button MouseButton) *EmulateTouchFromMouseEventParams

EmulateTouchFromMouseEvent emulates touch event from the mouse event parameters.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-emulateTouchFromMouseEvent

parameters:

type - Type of the mouse event.
x - X coordinate of the mouse pointer in DIP.
y - Y coordinate of the mouse pointer in DIP.
button - Mouse button. Only "none", "left", "right" are supported.

func (*EmulateTouchFromMouseEventParams) Do

Do executes Input.emulateTouchFromMouseEvent against the provided context.

func (EmulateTouchFromMouseEventParams) MarshalEasyJSON

func (v EmulateTouchFromMouseEventParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EmulateTouchFromMouseEventParams) MarshalJSON

func (v EmulateTouchFromMouseEventParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EmulateTouchFromMouseEventParams) UnmarshalEasyJSON

func (v *EmulateTouchFromMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EmulateTouchFromMouseEventParams) UnmarshalJSON

func (v *EmulateTouchFromMouseEventParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (EmulateTouchFromMouseEventParams) WithClickCount

WithClickCount number of times the mouse button was clicked (default: 0).

func (EmulateTouchFromMouseEventParams) WithDeltaX

WithDeltaX X delta in DIP for mouse wheel event (default: 0).

func (EmulateTouchFromMouseEventParams) WithDeltaY

WithDeltaY Y delta in DIP for mouse wheel event (default: 0).

func (EmulateTouchFromMouseEventParams) WithModifiers

WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).

func (EmulateTouchFromMouseEventParams) WithTimestamp

WithTimestamp time at which the event occurred (default: current time).

type EventDragIntercepted

type EventDragIntercepted struct {
	Data *DragData `json:"data"`
}

EventDragIntercepted emitted only when Input.setInterceptDrags is enabled. Use this data with Input.dispatchDragEvent to restore normal drag and drop behavior.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#event-dragIntercepted

func (EventDragIntercepted) MarshalEasyJSON

func (v EventDragIntercepted) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventDragIntercepted) MarshalJSON

func (v EventDragIntercepted) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventDragIntercepted) UnmarshalEasyJSON

func (v *EventDragIntercepted) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventDragIntercepted) UnmarshalJSON

func (v *EventDragIntercepted) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GestureSourceType

type GestureSourceType string

GestureSourceType [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-GestureSourceType

const (
	GestureDefault GestureSourceType = "default"
	GestureTouch   GestureSourceType = "touch"
	GestureMouse   GestureSourceType = "mouse"
)

GestureSourceType values.

func (GestureSourceType) MarshalEasyJSON

func (t GestureSourceType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (GestureSourceType) MarshalJSON

func (t GestureSourceType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (GestureSourceType) String

func (t GestureSourceType) String() string

String returns the GestureSourceType as string value.

func (*GestureSourceType) UnmarshalEasyJSON

func (t *GestureSourceType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*GestureSourceType) UnmarshalJSON

func (t *GestureSourceType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type ImeSetCompositionParams

type ImeSetCompositionParams struct {
	Text             string `json:"text"`                       // The text to insert
	SelectionStart   int64  `json:"selectionStart"`             // selection start
	SelectionEnd     int64  `json:"selectionEnd"`               // selection end
	ReplacementStart int64  `json:"replacementStart,omitempty"` // replacement start
	ReplacementEnd   int64  `json:"replacementEnd,omitempty"`   // replacement end
}

ImeSetCompositionParams this method sets the current candidate text for IME. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition.

func ImeSetComposition

func ImeSetComposition(text string, selectionStart int64, selectionEnd int64) *ImeSetCompositionParams

ImeSetComposition this method sets the current candidate text for IME. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-imeSetComposition

parameters:

text - The text to insert
selectionStart - selection start
selectionEnd - selection end

func (*ImeSetCompositionParams) Do

func (p *ImeSetCompositionParams) Do(ctx context.Context) (err error)

Do executes Input.imeSetComposition against the provided context.

func (ImeSetCompositionParams) MarshalEasyJSON

func (v ImeSetCompositionParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ImeSetCompositionParams) MarshalJSON

func (v ImeSetCompositionParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ImeSetCompositionParams) UnmarshalEasyJSON

func (v *ImeSetCompositionParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ImeSetCompositionParams) UnmarshalJSON

func (v *ImeSetCompositionParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (ImeSetCompositionParams) WithReplacementEnd

func (p ImeSetCompositionParams) WithReplacementEnd(replacementEnd int64) *ImeSetCompositionParams

WithReplacementEnd replacement end.

func (ImeSetCompositionParams) WithReplacementStart

func (p ImeSetCompositionParams) WithReplacementStart(replacementStart int64) *ImeSetCompositionParams

WithReplacementStart replacement start.

type InsertTextParams

type InsertTextParams struct {
	Text string `json:"text"` // The text to insert.
}

InsertTextParams this method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.

func InsertText

func InsertText(text string) *InsertTextParams

InsertText this method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-insertText

parameters:

text - The text to insert.

func (*InsertTextParams) Do

func (p *InsertTextParams) Do(ctx context.Context) (err error)

Do executes Input.insertText against the provided context.

func (InsertTextParams) MarshalEasyJSON

func (v InsertTextParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (InsertTextParams) MarshalJSON

func (v InsertTextParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*InsertTextParams) UnmarshalEasyJSON

func (v *InsertTextParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*InsertTextParams) UnmarshalJSON

func (v *InsertTextParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type KeyType

type KeyType string

KeyType type of the key event.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent

const (
	KeyDown    KeyType = "keyDown"
	KeyUp      KeyType = "keyUp"
	KeyRawDown KeyType = "rawKeyDown"
	KeyChar    KeyType = "char"
)

KeyType values.

func (KeyType) MarshalEasyJSON

func (t KeyType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (KeyType) MarshalJSON

func (t KeyType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (KeyType) String

func (t KeyType) String() string

String returns the KeyType as string value.

func (*KeyType) UnmarshalEasyJSON

func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*KeyType) UnmarshalJSON

func (t *KeyType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type Modifier

type Modifier int64

Modifier input key modifier type.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent

const (
	ModifierNone  Modifier = 0
	ModifierAlt   Modifier = 1
	ModifierCtrl  Modifier = 2
	ModifierMeta  Modifier = 4
	ModifierShift Modifier = 8
)

Modifier values.

const ModifierCommand Modifier = ModifierMeta

ModifierCommand is an alias for ModifierMeta.

func (Modifier) Int64

func (t Modifier) Int64() int64

Int64 returns the Modifier as int64 value.

func (Modifier) MarshalEasyJSON

func (t Modifier) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (Modifier) MarshalJSON

func (t Modifier) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (Modifier) String

func (t Modifier) String() string

String returns the Modifier as string value.

func (*Modifier) UnmarshalEasyJSON

func (t *Modifier) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*Modifier) UnmarshalJSON

func (t *Modifier) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type MouseButton

type MouseButton string

MouseButton [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-MouseButton

const (
	None    MouseButton = "none"
	Left    MouseButton = "left"
	Middle  MouseButton = "middle"
	Right   MouseButton = "right"
	Back    MouseButton = "back"
	Forward MouseButton = "forward"
)

MouseButton values.

func (MouseButton) MarshalEasyJSON

func (t MouseButton) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (MouseButton) MarshalJSON

func (t MouseButton) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (MouseButton) String

func (t MouseButton) String() string

String returns the MouseButton as string value.

func (*MouseButton) UnmarshalEasyJSON

func (t *MouseButton) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*MouseButton) UnmarshalJSON

func (t *MouseButton) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type MouseType

type MouseType string

MouseType type of the mouse event.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent

const (
	MousePressed  MouseType = "mousePressed"
	MouseReleased MouseType = "mouseReleased"
	MouseMoved    MouseType = "mouseMoved"
	MouseWheel    MouseType = "mouseWheel"
)

MouseType values.

func (MouseType) MarshalEasyJSON

func (t MouseType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (MouseType) MarshalJSON

func (t MouseType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (MouseType) String

func (t MouseType) String() string

String returns the MouseType as string value.

func (*MouseType) UnmarshalEasyJSON

func (t *MouseType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*MouseType) UnmarshalJSON

func (t *MouseType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type SetIgnoreInputEventsParams

type SetIgnoreInputEventsParams struct {
	Ignore bool `json:"ignore"` // Ignores input events processing when set to true.
}

SetIgnoreInputEventsParams ignores input events (useful while auditing page).

func SetIgnoreInputEvents

func SetIgnoreInputEvents(ignore bool) *SetIgnoreInputEventsParams

SetIgnoreInputEvents ignores input events (useful while auditing page).

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-setIgnoreInputEvents

parameters:

ignore - Ignores input events processing when set to true.

func (*SetIgnoreInputEventsParams) Do

Do executes Input.setIgnoreInputEvents against the provided context.

func (SetIgnoreInputEventsParams) MarshalEasyJSON

func (v SetIgnoreInputEventsParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetIgnoreInputEventsParams) MarshalJSON

func (v SetIgnoreInputEventsParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetIgnoreInputEventsParams) UnmarshalEasyJSON

func (v *SetIgnoreInputEventsParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetIgnoreInputEventsParams) UnmarshalJSON

func (v *SetIgnoreInputEventsParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetInterceptDragsParams

type SetInterceptDragsParams struct {
	Enabled bool `json:"enabled"`
}

SetInterceptDragsParams prevents default drag and drop behavior and instead emits Input.dragIntercepted events. Drag and drop behavior can be directly controlled via Input.dispatchDragEvent.

func SetInterceptDrags

func SetInterceptDrags(enabled bool) *SetInterceptDragsParams

SetInterceptDrags prevents default drag and drop behavior and instead emits Input.dragIntercepted events. Drag and drop behavior can be directly controlled via Input.dispatchDragEvent.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-setInterceptDrags

parameters:

enabled

func (*SetInterceptDragsParams) Do

func (p *SetInterceptDragsParams) Do(ctx context.Context) (err error)

Do executes Input.setInterceptDrags against the provided context.

func (SetInterceptDragsParams) MarshalEasyJSON

func (v SetInterceptDragsParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetInterceptDragsParams) MarshalJSON

func (v SetInterceptDragsParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetInterceptDragsParams) UnmarshalEasyJSON

func (v *SetInterceptDragsParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetInterceptDragsParams) UnmarshalJSON

func (v *SetInterceptDragsParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SynthesizePinchGestureParams

type SynthesizePinchGestureParams struct {
	X                 float64           `json:"x"`                           // X coordinate of the start of the gesture in CSS pixels.
	Y                 float64           `json:"y"`                           // Y coordinate of the start of the gesture in CSS pixels.
	ScaleFactor       float64           `json:"scaleFactor"`                 // Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
	RelativeSpeed     int64             `json:"relativeSpeed,omitempty"`     // Relative pointer speed in pixels per second (default: 800).
	GestureSourceType GestureSourceType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
}

SynthesizePinchGestureParams synthesizes a pinch gesture over a time period by issuing appropriate touch events.

func SynthesizePinchGesture

func SynthesizePinchGesture(x float64, y float64, scaleFactor float64) *SynthesizePinchGestureParams

SynthesizePinchGesture synthesizes a pinch gesture over a time period by issuing appropriate touch events.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizePinchGesture

parameters:

x - X coordinate of the start of the gesture in CSS pixels.
y - Y coordinate of the start of the gesture in CSS pixels.
scaleFactor - Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).

func (*SynthesizePinchGestureParams) Do

Do executes Input.synthesizePinchGesture against the provided context.

func (SynthesizePinchGestureParams) MarshalEasyJSON

func (v SynthesizePinchGestureParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SynthesizePinchGestureParams) MarshalJSON

func (v SynthesizePinchGestureParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SynthesizePinchGestureParams) UnmarshalEasyJSON

func (v *SynthesizePinchGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SynthesizePinchGestureParams) UnmarshalJSON

func (v *SynthesizePinchGestureParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SynthesizePinchGestureParams) WithGestureSourceType

func (p SynthesizePinchGestureParams) WithGestureSourceType(gestureSourceType GestureSourceType) *SynthesizePinchGestureParams

WithGestureSourceType which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).

func (SynthesizePinchGestureParams) WithRelativeSpeed

func (p SynthesizePinchGestureParams) WithRelativeSpeed(relativeSpeed int64) *SynthesizePinchGestureParams

WithRelativeSpeed relative pointer speed in pixels per second (default: 800).

type SynthesizeScrollGestureParams

type SynthesizeScrollGestureParams struct {
	X                     float64           `json:"x"`                               // X coordinate of the start of the gesture in CSS pixels.
	Y                     float64           `json:"y"`                               // Y coordinate of the start of the gesture in CSS pixels.
	XDistance             float64           `json:"xDistance,omitempty"`             // The distance to scroll along the X axis (positive to scroll left).
	YDistance             float64           `json:"yDistance,omitempty"`             // The distance to scroll along the Y axis (positive to scroll up).
	XOverscroll           float64           `json:"xOverscroll,omitempty"`           // The number of additional pixels to scroll back along the X axis, in addition to the given distance.
	YOverscroll           float64           `json:"yOverscroll,omitempty"`           // The number of additional pixels to scroll back along the Y axis, in addition to the given distance.
	PreventFling          bool              `json:"preventFling,omitempty"`          // Prevent fling (default: true).
	Speed                 int64             `json:"speed,omitempty"`                 // Swipe speed in pixels per second (default: 800).
	GestureSourceType     GestureSourceType `json:"gestureSourceType,omitempty"`     // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
	RepeatCount           int64             `json:"repeatCount,omitempty"`           // The number of times to repeat the gesture (default: 0).
	RepeatDelayMs         int64             `json:"repeatDelayMs,omitempty"`         // The number of milliseconds delay between each repeat. (default: 250).
	InteractionMarkerName string            `json:"interactionMarkerName,omitempty"` // The name of the interaction markers to generate, if not empty (default: "").
}

SynthesizeScrollGestureParams synthesizes a scroll gesture over a time period by issuing appropriate touch events.

func SynthesizeScrollGesture

func SynthesizeScrollGesture(x float64, y float64) *SynthesizeScrollGestureParams

SynthesizeScrollGesture synthesizes a scroll gesture over a time period by issuing appropriate touch events.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeScrollGesture

parameters:

x - X coordinate of the start of the gesture in CSS pixels.
y - Y coordinate of the start of the gesture in CSS pixels.

func (*SynthesizeScrollGestureParams) Do

Do executes Input.synthesizeScrollGesture against the provided context.

func (SynthesizeScrollGestureParams) MarshalEasyJSON

func (v SynthesizeScrollGestureParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SynthesizeScrollGestureParams) MarshalJSON

func (v SynthesizeScrollGestureParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SynthesizeScrollGestureParams) UnmarshalEasyJSON

func (v *SynthesizeScrollGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SynthesizeScrollGestureParams) UnmarshalJSON

func (v *SynthesizeScrollGestureParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SynthesizeScrollGestureParams) WithGestureSourceType

func (p SynthesizeScrollGestureParams) WithGestureSourceType(gestureSourceType GestureSourceType) *SynthesizeScrollGestureParams

WithGestureSourceType which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).

func (SynthesizeScrollGestureParams) WithInteractionMarkerName

func (p SynthesizeScrollGestureParams) WithInteractionMarkerName(interactionMarkerName string) *SynthesizeScrollGestureParams

WithInteractionMarkerName the name of the interaction markers to generate, if not empty (default: "").

func (SynthesizeScrollGestureParams) WithPreventFling

func (p SynthesizeScrollGestureParams) WithPreventFling(preventFling bool) *SynthesizeScrollGestureParams

WithPreventFling prevent fling (default: true).

func (SynthesizeScrollGestureParams) WithRepeatCount

func (p SynthesizeScrollGestureParams) WithRepeatCount(repeatCount int64) *SynthesizeScrollGestureParams

WithRepeatCount the number of times to repeat the gesture (default: 0).

func (SynthesizeScrollGestureParams) WithRepeatDelayMs

func (p SynthesizeScrollGestureParams) WithRepeatDelayMs(repeatDelayMs int64) *SynthesizeScrollGestureParams

WithRepeatDelayMs the number of milliseconds delay between each repeat. (default: 250).

func (SynthesizeScrollGestureParams) WithSpeed

WithSpeed swipe speed in pixels per second (default: 800).

func (SynthesizeScrollGestureParams) WithXDistance

WithXDistance the distance to scroll along the X axis (positive to scroll left).

func (SynthesizeScrollGestureParams) WithXOverscroll

WithXOverscroll the number of additional pixels to scroll back along the X axis, in addition to the given distance.

func (SynthesizeScrollGestureParams) WithYDistance

WithYDistance the distance to scroll along the Y axis (positive to scroll up).

func (SynthesizeScrollGestureParams) WithYOverscroll

WithYOverscroll the number of additional pixels to scroll back along the Y axis, in addition to the given distance.

type SynthesizeTapGestureParams

type SynthesizeTapGestureParams struct {
	X                 float64           `json:"x"`                           // X coordinate of the start of the gesture in CSS pixels.
	Y                 float64           `json:"y"`                           // Y coordinate of the start of the gesture in CSS pixels.
	Duration          int64             `json:"duration,omitempty"`          // Duration between touchdown and touchup events in ms (default: 50).
	TapCount          int64             `json:"tapCount,omitempty"`          // Number of times to perform the tap (e.g. 2 for double tap, default: 1).
	GestureSourceType GestureSourceType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
}

SynthesizeTapGestureParams synthesizes a tap gesture over a time period by issuing appropriate touch events.

func SynthesizeTapGesture

func SynthesizeTapGesture(x float64, y float64) *SynthesizeTapGestureParams

SynthesizeTapGesture synthesizes a tap gesture over a time period by issuing appropriate touch events.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeTapGesture

parameters:

x - X coordinate of the start of the gesture in CSS pixels.
y - Y coordinate of the start of the gesture in CSS pixels.

func (*SynthesizeTapGestureParams) Do

Do executes Input.synthesizeTapGesture against the provided context.

func (SynthesizeTapGestureParams) MarshalEasyJSON

func (v SynthesizeTapGestureParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SynthesizeTapGestureParams) MarshalJSON

func (v SynthesizeTapGestureParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SynthesizeTapGestureParams) UnmarshalEasyJSON

func (v *SynthesizeTapGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SynthesizeTapGestureParams) UnmarshalJSON

func (v *SynthesizeTapGestureParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SynthesizeTapGestureParams) WithDuration

WithDuration duration between touchdown and touchup events in ms (default: 50).

func (SynthesizeTapGestureParams) WithGestureSourceType

func (p SynthesizeTapGestureParams) WithGestureSourceType(gestureSourceType GestureSourceType) *SynthesizeTapGestureParams

WithGestureSourceType which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).

func (SynthesizeTapGestureParams) WithTapCount

WithTapCount number of times to perform the tap (e.g. 2 for double tap, default: 1).

type TimeSinceEpoch

type TimeSinceEpoch time.Time

TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-TimeSinceEpoch

func (TimeSinceEpoch) MarshalEasyJSON

func (t TimeSinceEpoch) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (TimeSinceEpoch) MarshalJSON

func (t TimeSinceEpoch) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (TimeSinceEpoch) Time

func (t TimeSinceEpoch) Time() time.Time

Time returns the TimeSinceEpoch as time.Time value.

func (*TimeSinceEpoch) UnmarshalEasyJSON

func (t *TimeSinceEpoch) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*TimeSinceEpoch) UnmarshalJSON

func (t *TimeSinceEpoch) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type TouchPoint

type TouchPoint struct {
	X                  float64 `json:"x"`                            // X coordinate of the event relative to the main frame's viewport in CSS pixels.
	Y                  float64 `json:"y"`                            // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
	RadiusX            float64 `json:"radiusX,omitempty"`            // X radius of the touch area (default: 1.0).
	RadiusY            float64 `json:"radiusY,omitempty"`            // Y radius of the touch area (default: 1.0).
	RotationAngle      float64 `json:"rotationAngle,omitempty"`      // Rotation angle (default: 0.0).
	Force              float64 `json:"force,omitempty"`              // Force (default: 1.0).
	TangentialPressure float64 `json:"tangentialPressure,omitempty"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
	TiltX              float64 `json:"tiltX,omitempty"`              // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
	TiltY              float64 `json:"tiltY,omitempty"`              // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
	Twist              int64   `json:"twist,omitempty"`              // The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
	ID                 float64 `json:"id,omitempty"`                 // Identifier used to track touch sources between events, must be unique within an event.
}

TouchPoint [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-TouchPoint

func (TouchPoint) MarshalEasyJSON

func (v TouchPoint) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (TouchPoint) MarshalJSON

func (v TouchPoint) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*TouchPoint) UnmarshalEasyJSON

func (v *TouchPoint) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TouchPoint) UnmarshalJSON

func (v *TouchPoint) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type TouchType

type TouchType string

TouchType type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.

See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchTouchEvent

const (
	TouchStart  TouchType = "touchStart"
	TouchEnd    TouchType = "touchEnd"
	TouchMove   TouchType = "touchMove"
	TouchCancel TouchType = "touchCancel"
)

TouchType values.

func (TouchType) MarshalEasyJSON

func (t TouchType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (TouchType) MarshalJSON

func (t TouchType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (TouchType) String

func (t TouchType) String() string

String returns the TouchType as string value.

func (*TouchType) UnmarshalEasyJSON

func (t *TouchType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*TouchType) UnmarshalJSON

func (t *TouchType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL