Documentation
¶
Overview ¶
Package input provides the Chrome DevTools Protocol commands, types, and events for the Input domain.
Generated by the pdlgen command.
Index ¶
- Constants
- type CancelDraggingParams
- type DispatchDragEventParams
- type DispatchDragEventType
- type DispatchKeyEventParams
- func (p *DispatchKeyEventParams) Do(ctx context.Context) (err error)
- func (p DispatchKeyEventParams) WithAutoRepeat(autoRepeat bool) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithCode(code string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithCommands(commands []string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithIsKeypad(isKeypad bool) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithIsSystemKey(isSystemKey bool) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithKey(key string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithKeyIdentifier(keyIdentifier string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithLocation(location int64) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithModifiers(modifiers int64) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithNativeVirtualKeyCode(nativeVirtualKeyCode int64) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithText(text string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithTimestamp(timestamp TimeSinceEpoch) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithUnmodifiedText(unmodifiedText string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithWindowsVirtualKeyCode(windowsVirtualKeyCode int64) *DispatchKeyEventParams
- type DispatchKeyEventType
- type DispatchMouseEventParams
- func (p *DispatchMouseEventParams) Do(ctx context.Context) (err error)
- func (p DispatchMouseEventParams) WithButton(button MouseButton) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithButtons(buttons int64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithClickCount(clickCount int64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithDeltaX(deltaX float64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithDeltaY(deltaY float64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithForce(force float64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithModifiers(modifiers int64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithPointerType(pointerType DispatchMouseEventPointerType) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithTangentialPressure(tangentialPressure float64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithTiltX(tiltX float64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithTiltY(tiltY float64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithTimestamp(timestamp TimeSinceEpoch) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithTwist(twist int64) *DispatchMouseEventParams
- type DispatchMouseEventPointerType
- type DispatchMouseEventType
- type DispatchTouchEventParams
- type DispatchTouchEventType
- type DragData
- type DragDataItem
- type EmulateTouchFromMouseEventParams
- func (p *EmulateTouchFromMouseEventParams) Do(ctx context.Context) (err error)
- func (p EmulateTouchFromMouseEventParams) WithClickCount(clickCount int64) *EmulateTouchFromMouseEventParams
- func (p EmulateTouchFromMouseEventParams) WithDeltaX(deltaX float64) *EmulateTouchFromMouseEventParams
- func (p EmulateTouchFromMouseEventParams) WithDeltaY(deltaY float64) *EmulateTouchFromMouseEventParams
- func (p EmulateTouchFromMouseEventParams) WithModifiers(modifiers int64) *EmulateTouchFromMouseEventParams
- func (p EmulateTouchFromMouseEventParams) WithTimestamp(timestamp TimeSinceEpoch) *EmulateTouchFromMouseEventParams
- type EmulateTouchFromMouseEventType
- type EventDragIntercepted
- type GestureSourceType
- type ImeSetCompositionParams
- type InsertTextParams
- type MouseButton
- type SetIgnoreInputEventsParams
- type SetInterceptDragsParams
- type SynthesizePinchGestureParams
- func (p *SynthesizePinchGestureParams) Do(ctx context.Context) (err error)
- func (p SynthesizePinchGestureParams) WithGestureSourceType(gestureSourceType GestureSourceType) *SynthesizePinchGestureParams
- func (p SynthesizePinchGestureParams) WithRelativeSpeed(relativeSpeed int64) *SynthesizePinchGestureParams
- type SynthesizeScrollGestureParams
- func (p *SynthesizeScrollGestureParams) Do(ctx context.Context) (err error)
- func (p SynthesizeScrollGestureParams) WithGestureSourceType(gestureSourceType GestureSourceType) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithInteractionMarkerName(interactionMarkerName string) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithPreventFling(preventFling bool) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithRepeatCount(repeatCount int64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithRepeatDelayMs(repeatDelayMs int64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithSpeed(speed int64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithXDistance(xDistance float64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithXOverscroll(xOverscroll float64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithYDistance(yDistance float64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithYOverscroll(yOverscroll float64) *SynthesizeScrollGestureParams
- type SynthesizeTapGestureParams
- func (p *SynthesizeTapGestureParams) Do(ctx context.Context) (err error)
- func (p SynthesizeTapGestureParams) WithDuration(duration int64) *SynthesizeTapGestureParams
- func (p SynthesizeTapGestureParams) WithGestureSourceType(gestureSourceType GestureSourceType) *SynthesizeTapGestureParams
- func (p SynthesizeTapGestureParams) WithTapCount(tapCount int64) *SynthesizeTapGestureParams
- type TimeSinceEpoch
- type TouchPoint
Constants ¶
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
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 int64 `json:"modifiers,omitempty,omitzero"` // 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) WithModifiers ¶
func (p DispatchDragEventParams) WithModifiers(modifiers int64) *DispatchDragEventParams
WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
type DispatchDragEventType ¶ added in v0.157.1
type DispatchDragEventType string
DispatchDragEventType type of the drag event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchDragEvent
const ( DispatchDragEventTypeDragEnter DispatchDragEventType = "dragEnter" DispatchDragEventTypeDragOver DispatchDragEventType = "dragOver" DispatchDragEventTypeDrop DispatchDragEventType = "drop" DispatchDragEventTypeDragCancel DispatchDragEventType = "dragCancel" )
DispatchDragEventType values.
func (DispatchDragEventType) String ¶ added in v0.157.1
func (t DispatchDragEventType) String() string
String returns the DispatchDragEventType as string value.
type DispatchKeyEventParams ¶
type DispatchKeyEventParams struct {
Type DispatchKeyEventType `json:"type"` // Type of the key event.
Modifiers int64 `json:"modifiers,omitempty,omitzero"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
Timestamp TimeSinceEpoch `json:"timestamp,omitempty,omitzero"` // Time at which the event occurred.
Text string `json:"text,omitempty,omitzero"` // 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,omitzero"` // 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,omitzero"` // Unique key identifier (e.g., 'U+0041') (default: "").
Code string `json:"code,omitempty,omitzero"` // Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
Key string `json:"key,omitempty,omitzero"` // 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,omitzero"` // Windows virtual key code (default: 0).
NativeVirtualKeyCode int64 `json:"nativeVirtualKeyCode,omitempty,omitzero"` // 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,omitzero"` // Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
Commands []string `json:"commands,omitempty,omitzero"` // 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 DispatchKeyEventType) *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) WithAutoRepeat ¶
func (p DispatchKeyEventParams) WithAutoRepeat(autoRepeat bool) *DispatchKeyEventParams
WithAutoRepeat whether the event was generated from auto repeat (default: false).
func (DispatchKeyEventParams) WithCode ¶
func (p DispatchKeyEventParams) WithCode(code string) *DispatchKeyEventParams
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 ¶
func (p DispatchKeyEventParams) WithKey(key string) *DispatchKeyEventParams
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 int64) *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 ¶
func (p DispatchKeyEventParams) WithText(text string) *DispatchKeyEventParams
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 DispatchKeyEventType ¶ added in v0.157.1
type DispatchKeyEventType string
DispatchKeyEventType type of the key event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent
const ( DispatchKeyEventTypeKeyDown DispatchKeyEventType = "keyDown" DispatchKeyEventTypeKeyUp DispatchKeyEventType = "keyUp" DispatchKeyEventTypeRawKeyDown DispatchKeyEventType = "rawKeyDown" DispatchKeyEventTypeChar DispatchKeyEventType = "char" )
DispatchKeyEventType values.
func (DispatchKeyEventType) String ¶ added in v0.157.1
func (t DispatchKeyEventType) String() string
String returns the DispatchKeyEventType as string value.
type DispatchMouseEventParams ¶
type DispatchMouseEventParams struct {
Type DispatchMouseEventType `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 int64 `json:"modifiers,omitempty,omitzero"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
Timestamp TimeSinceEpoch `json:"timestamp,omitempty,omitzero"` // Time at which the event occurred.
Button MouseButton `json:"button,omitempty,omitzero"` // Mouse button (default: "none").
Buttons int64 `json:"buttons,omitempty,omitzero"` // 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,omitzero"` // Number of times the mouse button was clicked (default: 0).
Force float64 `json:"force,omitempty,omitzero"` // The normalized pressure, which has a range of [0,1] (default: 0).
TangentialPressure float64 `json:"tangentialPressure,omitempty,omitzero"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
TiltX float64 `json:"tiltX,omitempty,omitzero"` // 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,omitzero"` // 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,omitzero"` // 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,omitempty,omitzero"` // X delta in CSS pixels for mouse wheel event (default: 0).
DeltaY float64 `json:"deltaY,omitempty,omitzero"` // Y delta in CSS pixels for mouse wheel event (default: 0).
PointerType DispatchMouseEventPointerType `json:"pointerType,omitempty,omitzero"` // Pointer type (default: "mouse").
}
DispatchMouseEventParams dispatches a mouse event to the page.
func DispatchMouseEvent ¶
func DispatchMouseEvent(typeVal DispatchMouseEventType, 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) WithButton ¶
func (p DispatchMouseEventParams) WithButton(button MouseButton) *DispatchMouseEventParams
WithButton mouse button (default: "none").
func (DispatchMouseEventParams) WithButtons ¶
func (p DispatchMouseEventParams) WithButtons(buttons int64) *DispatchMouseEventParams
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 ¶
func (p DispatchMouseEventParams) WithDeltaX(deltaX float64) *DispatchMouseEventParams
WithDeltaX X delta in CSS pixels for mouse wheel event (default: 0).
func (DispatchMouseEventParams) WithDeltaY ¶
func (p DispatchMouseEventParams) WithDeltaY(deltaY float64) *DispatchMouseEventParams
WithDeltaY Y delta in CSS pixels for mouse wheel event (default: 0).
func (DispatchMouseEventParams) WithForce ¶
func (p DispatchMouseEventParams) WithForce(force float64) *DispatchMouseEventParams
WithForce the normalized pressure, which has a range of [0,1] (default: 0).
func (DispatchMouseEventParams) WithModifiers ¶
func (p DispatchMouseEventParams) WithModifiers(modifiers int64) *DispatchMouseEventParams
WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
func (DispatchMouseEventParams) WithPointerType ¶
func (p DispatchMouseEventParams) WithPointerType(pointerType DispatchMouseEventPointerType) *DispatchMouseEventParams
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 ¶
func (p DispatchMouseEventParams) WithTiltX(tiltX float64) *DispatchMouseEventParams
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 ¶
func (p DispatchMouseEventParams) WithTiltY(tiltY float64) *DispatchMouseEventParams
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 ¶
func (p DispatchMouseEventParams) WithTimestamp(timestamp TimeSinceEpoch) *DispatchMouseEventParams
WithTimestamp time at which the event occurred.
func (DispatchMouseEventParams) WithTwist ¶
func (p DispatchMouseEventParams) WithTwist(twist int64) *DispatchMouseEventParams
WithTwist the clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
type DispatchMouseEventPointerType ¶ added in v0.157.1
type DispatchMouseEventPointerType string
DispatchMouseEventPointerType pointer type (default: "mouse").
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
const ( DispatchMouseEventPointerTypeMouse DispatchMouseEventPointerType = "mouse" DispatchMouseEventPointerTypePen DispatchMouseEventPointerType = "pen" )
DispatchMouseEventPointerType values.
func (DispatchMouseEventPointerType) String ¶ added in v0.157.1
func (t DispatchMouseEventPointerType) String() string
String returns the DispatchMouseEventPointerType as string value.
type DispatchMouseEventType ¶ added in v0.157.1
type DispatchMouseEventType string
DispatchMouseEventType type of the mouse event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
const ( DispatchMouseEventTypeMousePressed DispatchMouseEventType = "mousePressed" DispatchMouseEventTypeMouseReleased DispatchMouseEventType = "mouseReleased" DispatchMouseEventTypeMouseMoved DispatchMouseEventType = "mouseMoved" DispatchMouseEventTypeMouseWheel DispatchMouseEventType = "mouseWheel" )
DispatchMouseEventType values.
func (DispatchMouseEventType) String ¶ added in v0.157.1
func (t DispatchMouseEventType) String() string
String returns the DispatchMouseEventType as string value.
type DispatchTouchEventParams ¶
type DispatchTouchEventParams struct {
Type DispatchTouchEventType `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 int64 `json:"modifiers,omitempty,omitzero"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
Timestamp TimeSinceEpoch `json:"timestamp,omitempty,omitzero"` // Time at which the event occurred.
}
DispatchTouchEventParams dispatches a touch event to the page.
func DispatchTouchEvent ¶
func DispatchTouchEvent(typeVal DispatchTouchEventType, 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) WithModifiers ¶
func (p DispatchTouchEventParams) WithModifiers(modifiers int64) *DispatchTouchEventParams
WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
func (DispatchTouchEventParams) WithTimestamp ¶
func (p DispatchTouchEventParams) WithTimestamp(timestamp TimeSinceEpoch) *DispatchTouchEventParams
WithTimestamp time at which the event occurred.
type DispatchTouchEventType ¶ added in v0.157.1
type DispatchTouchEventType string
DispatchTouchEventType 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 ( DispatchTouchEventTypeTouchStart DispatchTouchEventType = "touchStart" DispatchTouchEventTypeTouchEnd DispatchTouchEventType = "touchEnd" DispatchTouchEventTypeTouchMove DispatchTouchEventType = "touchMove" DispatchTouchEventTypeTouchCancel DispatchTouchEventType = "touchCancel" )
DispatchTouchEventType values.
func (DispatchTouchEventType) String ¶ added in v0.157.1
func (t DispatchTouchEventType) String() string
String returns the DispatchTouchEventType as string value.
type DragData ¶
type DragData struct {
Items []*DragDataItem `json:"items"`
Files []string `json:"files,omitempty,omitzero"` // 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
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,omitzero"` // Title associated with a link. Only valid when mimeType == "text/uri-list".
BaseURL string `json:"baseURL,omitempty,omitzero"` // 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
type EmulateTouchFromMouseEventParams ¶
type EmulateTouchFromMouseEventParams struct {
Type EmulateTouchFromMouseEventType `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,omitzero"` // Time at which the event occurred (default: current time).
DeltaX float64 `json:"deltaX,omitempty,omitzero"` // X delta in DIP for mouse wheel event (default: 0).
DeltaY float64 `json:"deltaY,omitempty,omitzero"` // Y delta in DIP for mouse wheel event (default: 0).
Modifiers int64 `json:"modifiers,omitempty,omitzero"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
ClickCount int64 `json:"clickCount,omitempty,omitzero"` // Number of times the mouse button was clicked (default: 0).
}
EmulateTouchFromMouseEventParams emulates touch event from the mouse event parameters.
func EmulateTouchFromMouseEvent ¶
func EmulateTouchFromMouseEvent(typeVal EmulateTouchFromMouseEventType, 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 ¶
func (p *EmulateTouchFromMouseEventParams) Do(ctx context.Context) (err error)
Do executes Input.emulateTouchFromMouseEvent against the provided context.
func (EmulateTouchFromMouseEventParams) WithClickCount ¶
func (p EmulateTouchFromMouseEventParams) WithClickCount(clickCount int64) *EmulateTouchFromMouseEventParams
WithClickCount number of times the mouse button was clicked (default: 0).
func (EmulateTouchFromMouseEventParams) WithDeltaX ¶
func (p EmulateTouchFromMouseEventParams) WithDeltaX(deltaX float64) *EmulateTouchFromMouseEventParams
WithDeltaX X delta in DIP for mouse wheel event (default: 0).
func (EmulateTouchFromMouseEventParams) WithDeltaY ¶
func (p EmulateTouchFromMouseEventParams) WithDeltaY(deltaY float64) *EmulateTouchFromMouseEventParams
WithDeltaY Y delta in DIP for mouse wheel event (default: 0).
func (EmulateTouchFromMouseEventParams) WithModifiers ¶
func (p EmulateTouchFromMouseEventParams) WithModifiers(modifiers int64) *EmulateTouchFromMouseEventParams
WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
func (EmulateTouchFromMouseEventParams) WithTimestamp ¶
func (p EmulateTouchFromMouseEventParams) WithTimestamp(timestamp TimeSinceEpoch) *EmulateTouchFromMouseEventParams
WithTimestamp time at which the event occurred (default: current time).
type EmulateTouchFromMouseEventType ¶ added in v0.157.1
type EmulateTouchFromMouseEventType string
EmulateTouchFromMouseEventType type of the mouse event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-emulateTouchFromMouseEvent
const ( EmulateTouchFromMouseEventTypeMousePressed EmulateTouchFromMouseEventType = "mousePressed" EmulateTouchFromMouseEventTypeMouseReleased EmulateTouchFromMouseEventType = "mouseReleased" EmulateTouchFromMouseEventTypeMouseMoved EmulateTouchFromMouseEventType = "mouseMoved" EmulateTouchFromMouseEventTypeMouseWheel EmulateTouchFromMouseEventType = "mouseWheel" )
EmulateTouchFromMouseEventType values.
func (EmulateTouchFromMouseEventType) String ¶ added in v0.157.1
func (t EmulateTouchFromMouseEventType) String() string
String returns the EmulateTouchFromMouseEventType as string value.
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
type GestureSourceType ¶
type GestureSourceType string
GestureSourceType [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-GestureSourceType
const ( GestureSourceTypeDefault GestureSourceType = "default" GestureSourceTypeTouch GestureSourceType = "touch" GestureSourceTypeMouse GestureSourceType = "mouse" )
GestureSourceType values.
func (GestureSourceType) String ¶
func (t GestureSourceType) String() string
String returns the GestureSourceType as string value.
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,omitzero"` // replacement start
ReplacementEnd int64 `json:"replacementEnd,omitempty,omitzero"` // 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) 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.
type MouseButton ¶
type MouseButton string
MouseButton [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-MouseButton
const ( MouseButtonNone MouseButton = "none" MouseButtonLeft MouseButton = "left" MouseButtonMiddle MouseButton = "middle" MouseButtonRight MouseButton = "right" MouseButtonBack MouseButton = "back" MouseButtonForward MouseButton = "forward" )
MouseButton values.
func (MouseButton) String ¶
func (t MouseButton) String() string
String returns the MouseButton as string value.
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.
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
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,omitzero"` // Relative pointer speed in pixels per second (default: 800).
GestureSourceType GestureSourceType `json:"gestureSourceType,omitempty,omitzero"` // 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 ¶
func (p *SynthesizePinchGestureParams) Do(ctx context.Context) (err error)
Do executes Input.synthesizePinchGesture against the provided context.
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,omitzero"` // The distance to scroll along the X axis (positive to scroll left).
YDistance float64 `json:"yDistance,omitempty,omitzero"` // The distance to scroll along the Y axis (positive to scroll up).
XOverscroll float64 `json:"xOverscroll,omitempty,omitzero"` // The number of additional pixels to scroll back along the X axis, in addition to the given distance.
YOverscroll float64 `json:"yOverscroll,omitempty,omitzero"` // The number of additional pixels to scroll back along the Y axis, in addition to the given distance.
PreventFling bool `json:"preventFling"` // Prevent fling (default: true).
Speed int64 `json:"speed,omitempty,omitzero"` // Swipe speed in pixels per second (default: 800).
GestureSourceType GestureSourceType `json:"gestureSourceType,omitempty,omitzero"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
RepeatCount int64 `json:"repeatCount,omitempty,omitzero"` // The number of times to repeat the gesture (default: 0).
RepeatDelayMs int64 `json:"repeatDelayMs,omitempty,omitzero"` // The number of milliseconds delay between each repeat. (default: 250).
InteractionMarkerName string `json:"interactionMarkerName,omitempty,omitzero"` // 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 ¶
func (p *SynthesizeScrollGestureParams) Do(ctx context.Context) (err error)
Do executes Input.synthesizeScrollGesture against the provided context.
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 ¶
func (p SynthesizeScrollGestureParams) WithSpeed(speed int64) *SynthesizeScrollGestureParams
WithSpeed swipe speed in pixels per second (default: 800).
func (SynthesizeScrollGestureParams) WithXDistance ¶
func (p SynthesizeScrollGestureParams) WithXDistance(xDistance float64) *SynthesizeScrollGestureParams
WithXDistance the distance to scroll along the X axis (positive to scroll left).
func (SynthesizeScrollGestureParams) WithXOverscroll ¶
func (p SynthesizeScrollGestureParams) WithXOverscroll(xOverscroll float64) *SynthesizeScrollGestureParams
WithXOverscroll the number of additional pixels to scroll back along the X axis, in addition to the given distance.
func (SynthesizeScrollGestureParams) WithYDistance ¶
func (p SynthesizeScrollGestureParams) WithYDistance(yDistance float64) *SynthesizeScrollGestureParams
WithYDistance the distance to scroll along the Y axis (positive to scroll up).
func (SynthesizeScrollGestureParams) WithYOverscroll ¶
func (p SynthesizeScrollGestureParams) WithYOverscroll(yOverscroll float64) *SynthesizeScrollGestureParams
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,omitzero"` // Duration between touchdown and touchup events in ms (default: 50).
TapCount int64 `json:"tapCount,omitempty,omitzero"` // Number of times to perform the tap (e.g. 2 for double tap, default: 1).
GestureSourceType GestureSourceType `json:"gestureSourceType,omitempty,omitzero"` // 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 ¶
func (p *SynthesizeTapGestureParams) Do(ctx context.Context) (err error)
Do executes Input.synthesizeTapGesture against the provided context.
func (SynthesizeTapGestureParams) WithDuration ¶
func (p SynthesizeTapGestureParams) WithDuration(duration int64) *SynthesizeTapGestureParams
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 ¶
func (p SynthesizeTapGestureParams) WithTapCount(tapCount int64) *SynthesizeTapGestureParams
WithTapCount number of times to perform the tap (e.g. 2 for double tap, default: 1).
type TimeSinceEpoch ¶
type TimeSinceEpoch float64
TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-TimeSinceEpoch
func (TimeSinceEpoch) Float64 ¶
func (t TimeSinceEpoch) Float64() float64
Float64 returns the TimeSinceEpoch as float64 value.
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,omitzero"` // X radius of the touch area (default: 1.0).
RadiusY float64 `json:"radiusY,omitempty,omitzero"` // Y radius of the touch area (default: 1.0).
RotationAngle float64 `json:"rotationAngle,omitempty,omitzero"` // Rotation angle (default: 0.0).
Force float64 `json:"force,omitempty,omitzero"` // Force (default: 1.0).
TangentialPressure float64 `json:"tangentialPressure,omitempty,omitzero"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
TiltX float64 `json:"tiltX,omitempty,omitzero"` // 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,omitzero"` // 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,omitzero"` // 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,omitzero"` // 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