MCPcopy Create free account
hub / github.com/aeroxy/chrome-devtools-cli / apply_network_rules

Method apply_network_rules

src/cdp.rs:377–382  ·  view source on GitHub ↗

Apply the daemon's current `blocklist` to the persistent session via `Network.setBlockedURLs`. Patterns are Chrome-style globs (e.g. `*.png`). Falls back silently if no persistent session is active (e.g. during daemon startup or after a target switch that hasn't finished attaching).

(&mut self)

Source from the content-addressed store, hash-verified

375 /// Falls back silently if no persistent session is active (e.g. during
376 /// daemon startup or after a target switch that hasn't finished attaching).
377 pub async fn apply_network_rules(&mut self) -> Result<()> {
378 if let Some(ref session) = self.persistent_session.clone() {
379 self.apply_network_rules_internal(session).await?;
380 }
381 Ok(())
382 }
383
384 /// Apply the current `blocklist` to a specific session via
385 /// `Network.setBlockedURLs`. Used for both the persistent session and

Callers 2

emulateFunction · 0.80
execute_commandFunction · 0.80

Calls 1

Tested by

no test coverage detected