Skip to main content

dispatch_command

Function dispatch_command 

Source
pub fn dispatch_command(
    backend: &dyn ServoBackend,
    method: &str,
    params: Value,
    target_id: &str,
) -> Result<Value, BridgeError>
Expand description

派发 CDP 命令。

§参数

  • backend: servo 后端抽象
  • method: CDP method 名(如 Page.navigate)
  • params: JSON 参数
  • target_id: 目标 Page 标识

§返回

  • Ok(Value): CDP-compatible JSON 响应
  • Err(BridgeError): 各种错误(E 类 NotSupported / A 类执行错误 / MethodNotFound)

@trace REQ-BAO-API-004 [level:library] @trace REQ-BAO-API-007 [level:library]