chromium-bidi
chromium-bidi copied to clipboard
Support both a "standalone" and "embedded" build
Idea: Support building/running the bidi mapper in two configurations:
- "embedded" - This is the current configuration. Mapper is injected into a browser tab and communicates with the rest of the browser through
exposeDevToolsProtocol. - "standalone" - New config. Mapper runs as a node module outside the browser and communicates with the browser through remote-debugging-port/pipe.
Motivation:
Standalone mode would simplify development and testing of mapper code. The bidi server code and mapper code would all run in the same node process which simplifies debugging.
This sounds reasonable if it doesn't come with any complications to support both contexts. Can the same API that exposeDevToolsProtocol exposes be used in the "standalone" config as well, so that extra code for achieving the same API in both is only needed when running as a node module? That would minimize binary size cost in the hoped-for final configuration of being bundled with the browser.
Unlocked by https://github.com/GoogleChromeLabs/chromium-bidi/commit/0d2b05c871d76607b678621ae0b43ebde1bd99e8