cdp-driver 0.5.0

Chrome DevTools Protocol (CDP) client for Rust: every command, event and type generated from the schema, with sessions, for browser automation and AI agents
Documentation
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.

//! DOM debugging allows setting breakpoints on particular DOM operations and
//! events. JavaScript execution will stop on these operations as if there was
//! a regular breakpoint set.
//!
//! Method names for the `DOMDebugger` domain, for use with
//! [`CdpClient::call`](crate::CdpClient::call).

/// Returns event listeners of the given object.
///
/// Parameters:
/// - `objectId`: Runtime.RemoteObjectId
/// - `depth`: integer (optional)
/// - `pierce`: boolean (optional)
///
/// Returns: `listeners`
pub const GET_EVENT_LISTENERS: &str = "DOMDebugger.getEventListeners";

/// Removes DOM breakpoint that was set using `setDOMBreakpoint`.
///
/// Parameters:
/// - `nodeId`: DOM.NodeId
/// - `type`: DOMBreakpointType
pub const REMOVE_DOM_BREAKPOINT: &str = "DOMDebugger.removeDOMBreakpoint";

/// Removes breakpoint on particular DOM event.
///
/// Parameters:
/// - `eventName`: string
/// - `targetName`: string (optional)
pub const REMOVE_EVENT_LISTENER_BREAKPOINT: &str = "DOMDebugger.removeEventListenerBreakpoint";

/// Removes breakpoint on particular native event.
///
/// Deprecated in the protocol.
/// Experimental: may change without notice.
///
/// Parameters:
/// - `eventName`: string
pub const REMOVE_INSTRUMENTATION_BREAKPOINT: &str = "DOMDebugger.removeInstrumentationBreakpoint";

/// Removes breakpoint from XMLHttpRequest.
///
/// Parameters:
/// - `url`: string
pub const REMOVE_XHR_BREAKPOINT: &str = "DOMDebugger.removeXHRBreakpoint";

/// Sets breakpoint on particular CSP violations.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `violationTypes`: array
pub const SET_BREAK_ON_CSP_VIOLATION: &str = "DOMDebugger.setBreakOnCSPViolation";

/// Sets breakpoint on particular operation with DOM.
///
/// Parameters:
/// - `nodeId`: DOM.NodeId
/// - `type`: DOMBreakpointType
pub const SET_DOM_BREAKPOINT: &str = "DOMDebugger.setDOMBreakpoint";

/// Sets breakpoint on particular DOM event.
///
/// Parameters:
/// - `eventName`: string
/// - `targetName`: string (optional)
pub const SET_EVENT_LISTENER_BREAKPOINT: &str = "DOMDebugger.setEventListenerBreakpoint";

/// Sets breakpoint on particular native event.
///
/// Deprecated in the protocol.
/// Experimental: may change without notice.
///
/// Parameters:
/// - `eventName`: string
pub const SET_INSTRUMENTATION_BREAKPOINT: &str = "DOMDebugger.setInstrumentationBreakpoint";

/// Sets breakpoint on XMLHttpRequest.
///
/// Parameters:
/// - `url`: string
pub const SET_XHR_BREAKPOINT: &str = "DOMDebugger.setXHRBreakpoint";