INNER CODE UNIT · Rust

Some

keon/browser-control · src/cdp.rs:59

        if let Some(e) = r.get("exceptionDetails") {
            bail!("eval exception: {}", js_exception(e))
        }
        Ok(r["result"]
            .get("value")
            .cloned()
            .unwrap_or_else(|| r["result"].clone()))
    }

    pub async fn call(&mut self, method: &str, params: Value, attach: bool) -> Result<Value> {
        if attach && self.session.is_none() {
            self.attach_page(None).await?
        }
        let s = attach.then(|| self.session.as_ref().unwrap().clone());
        self.send(method, params, s).await
    }

    pub async fn send(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…