codetether_browser/browser/request/motion.rs
1//! Motion request payloads for browser commands.
2
3use serde::Serialize;
4
5/// Scroll command parameters.
6///
7/// `selector` targets a specific element when present. Otherwise the native
8/// backend applies `x` and `y` deltas to the page scroll state.
9#[derive(Debug, Clone, Serialize)]
10pub struct ScrollRequest {
11 /// Optional CSS selector for the element to scroll.
12 pub selector: Option<String>,
13 /// Optional horizontal scroll delta.
14 pub x: Option<f64>,
15 /// Optional vertical scroll delta.
16 pub y: Option<f64>,
17 /// Optional frame selector retained for API compatibility.
18 pub frame_selector: Option<String>,
19}