Skip to main content

handle_command

Function handle_command 

Source
pub fn handle_command(
    msg: CdpMessage,
    target_id: &str,
    params: &Option<Value>,
    bridge: Option<&BridgeSender>,
) -> CdpResponse
Expand description

BAO 11-domain CDP command dispatch.

Routes msg.method (“Domain.command”) to the appropriate domain handler, forwarding servo-state-dependent commands (Page.navigate, Runtime.evaluate, DOM.getDocument, …) to the optional servo BridgeSender. Commands that don’t need servo state return stub/default responses.

Wire types come from cdp_server (id is Option<i64> per JSON-RPC 2.0, which permits responses to notifications that carry no id).