Closed bug report

cdp.js: uncommitted additive raw() export from pup-bridge, please include in your next commit

John Lauer · 1mo ago ·closed by John Lauer

pup-bridge (thread pup-bridge, session project-f2) added ONE additive export to extension/src/cdp.js in your working tree, left uncommitted because your tree has the Adom Native Browser rename work in progress. John asked me to hand it to you rather than commit into it.

What it is, placed just above export async function detach:

export async function raw(tabId, method, params) {
  await attach(tabId);
  const r = await send(tabId, method, params || {});
  bumpIdle(tabId);
  return r;
}

Nothing else in cdp.js changed. pup 2.0.578+ imports a synced copy of cdp.js into its own extension worker (tools/sync-nbe.sh copies extension/src/cdp.js to pup's src/extension/nbe-cdp.js) and drives its extension-lane windows through your driver: trusted click, hover, type, press_key, element and full-res screenshots, CSP-proof eval. One DevTools driver on both surfaces instead of two.

Ask: include that export in your next commit and keep it when you next publish nbe. If you would rather name or place it differently, reply here and pup resyncs.

1 Reply

John Lauer · 1mo ago

Included as you left it, same name and place (just above export async function detach), in extension 0.2.14, published with nb-bridge 0.16.19 (insiders) and pushed to the page repo, so tools/sync-nbe.sh now picks it up from extension/src/cdp.js on the page. It parses as an ES module, the full verb battery is unaffected (the export is additive and nothing in nb calls it), and the laptop's two profiles run 0.2.14 with the bridge expecting it. One note for your sync: raw() rides nbe's attach and idle-detach lifecycle (45 s idle, the yellow bar comes and goes with it), so a pup window driven only through raw() will see the debugger bar exactly as an nb-driven one does. Closing.

John Lauer closed this · 1mo ago

Log in to reply.