Skip to main content

Module cdp_session

Module cdp_session 

Source
Expand description

Transient flat-session helper for CDP page operations.

Every CDP page op in browser-control follows the same shape: attach a flat session to the target, enable Inspector so renderer crashes are observable, run the op under the crash-detecting timeout, and detach regardless of outcome. This helper factors that shape so new native operations (accessibility tree, input dispatch) do not copy the block from TabBackend::evaluate a fourth time.

Functions§

with_page_session
Attach to target_id, run f(session_id) bounded by timeout with crash detection, then detach. Detach is best-effort: the target may already be gone, and the caller’s result is what matters.