Module resolver

Module resolver 

Source
Expand description

Resolve block_id → CDP target id.

CEF’s /json endpoint exposes every active page target but does NOT expose the underlying cef::Browser::identifier(), so we can’t match by CEF id directly. Phase 1 strategy:

  1. Ask the pane manager for the pane’s current URL.
  2. Probe GET http://127.0.0.1:<debug>/json.
  3. Find the entry whose url matches the pane’s URL AND whose id isn’t already owned by some other cached block.
  4. Cache (block_id → target_id) for subsequent calls.

Known limit: two panes navigated to the same URL can’t be distinguished this way. Phase-1 consumers (dom-smoke, stress harness) use distinct URLs to avoid the collision. A later phase can swap in a snapshot-at-create strategy for bulletproof one-to-one mapping (see SPEC_BROWSER_DOM_API.md §5.5).

Structs§

JsonTarget 🔒
TargetCache

Functions§

normalize_url 🔒

Type Aliases§

ResolveError