Skip to content

Emulated Chromium ​

Emulated Chromium is a browser extension.dev builds and hosts at browsers.extension.land/chromium/. It runs your extension inside a web page, with a toolbar, a tab strip, an address bar, a popup, an options page, a side panel and a background service worker. Reach for it when you want a dev session in a tab instead of a browser profile on disk.

Quick start ​

bash
extension dev --browser chromium-emulator

The command prints the address and opens it in your default browser. The extension CLI is the Extension.js framework, documented at extension.js.org. It needs Extension.js 4.1.38 or later, and an earlier release opens Chrome instead. Only extension dev opens it, because the page reads your dev server. Everything after the address is this engine.

How it works ​

The same engine renders the live previews on templates.extension.dev. This page is about the address a developer opens from a terminal.

Nothing of your extension leaves your machine. Three things arrive from the hosted origin: the page, its script and stylesheet, and a table of engine behavior pinned by digest. The page reads your build from the dev server on your own loopback address. The lane runs no relay, so a fetch your extension makes goes straight from the page.

The session lives in the fragment of the address, after the #. A fragment is never sent in a request line and never in a Referer, so the loopback address and the session id do not reach the origin's logs.

The page reads the files index your dev server publishes, then reads each file and checks it against the digest the index promised. A file that does not match is refused by path, and the build already running is kept.

The page sits on a public address and reads a server on your machine. Chrome gates that behind the local network access site permission. The first run can be refused with no dialog, and the page names the permission when that happens. Allow local network access for the site, and reload.

It costs nothing. The build is compiled by your machine and the extension runs in your own browser tab. The platform serves a page and a table of behavior, and charges only for runs on its own machines, which this is not.

Emulated Chromium is not a shipped browser. Content scripts reach only the pages it serves itself, there is no inspector for your extension, and a handful of namespaces answer with stand-in data. The full list is one page: Emulated Chromium limits.

Reference ​

DirectionWhat moves
From the hosted originThe page, its script and stylesheet, and the table of engine behavior
From your machineNothing. The page reads your build from the dev server on loopback
Between themNothing. No relay, so your extension's fetches leave straight from the page
AddressWhat it serves
browsers.extension.land/chromium/The engine page a dev session opens
browsers.extension.land/chromium/version.jsonThe engine version
browsers.extension.land/chromium/termsThe terms of use

When it fails ​

  • The command opens Chrome instead of the emulated browser: the installed Extension.js is older than 4.1.38. Update it and run the command again.
  • The command warns that the origin did not answer: the warning reads "the emulated Chromium origin https://browsers.extension.land did not answer, so there is no page to open." The command opens nothing. Check your connection and run extension dev again, or run the project with --browser=chrome.
  • extension start or extension preview refuses chromium-emulator: the emulated browser reads the dev server, so only extension dev opens it.
  • The command prints the address and does not open it: the engine origin answered that it is not open yet or that it is rate limiting the address, and the command says which. Wait a minute and run it again, or run the project in Chrome.
  • The page says it cannot reach your dev server: Chrome refused local network access, possibly with no dialog. Allow it for the site in the page's site settings and reload.
  • A file was refused by path: its bytes did not match the digest your dev server listed. The build already running stays, and the page reports that the last reload was not applied.

Next ​