Browser Run - Browser Run adds session and DevTools methods to browser bindings
- Announced
- Tags
- Browser-Run
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-09-21-browser-binding-methods/
<p><a href="https://developers.cloudflare.com/browser-run/">Browser Run</a> browser bindings now provide typed methods for session management and DevTools operations. You can acquire a session, connect a browser client, create Live View URLs, manage targets, and close sessions without constructing HTTP requests.</p> <p>The new <code>acquire()</code> and <code>launch()</code> methods also accept <a href="https://developers.cloudflare.com/browser-run/features/outbound-workers/"><code>outboundByHost</code></a>. This lets you route requests for selected hostnames through another Worker, including a Worker that adds authentication or reaches a private service.</p> <div><div data-nb-tabs data-nb-sync-key="workersExamples" class><div class="relative flex border-b border-border" role="tablist" data-nb-tabs-list><span class="bg-primary pointer-events-none absolute -bottom-px h-0.5 rounded-t-sm transition-[left,width] duration-200 ease-out" data-nb-tabs-indicator aria-hidden="true"></span></div><div class="mt-3"><div role="tabpanel" data-nb-tabs-content data-nb-tab-label="JavaScript" class><figure class="nb-code-figure" data-nb-lang="js"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="js" data-nb-lang="js"><code><span class="line"><span class="nb-shiki-1itgoe">const</span><span class="nb-shiki-dzsirb"> connection</span><span class="nb-shiki-1itgoe"> =</span><span class="nb-shiki-1itgoe"> await</span><span class="nb-shiki-140thh"> env.</span><span class="nb-shiki-dzsirb">BROWSER</span><span class="nb-shiki-140thh">.</span><span class="nb-shiki-1t8gfj">launch</span><span class="nb-shiki-140thh">({</span></span> <span class="line"><span class="nb-shiki-140thh"> outboundByHost: {</span></span> <span class="line"><span class="nb-shiki-mdbnqw"> "private.example.test"</span><span class="nb-shiki-140thh">: env.</span><span class="nb-shiki-dzsirb">OUTBOUND</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-140thh"> },</span></span> <span class="line"><span class="nb-shiki-140thh">});</span></span></code></pre></figure></div><div role="tabpanel" data-nb-tabs-content data-nb-tab-label="TypeScript" class><figure class="nb-code-figure" data-nb-lang="ts"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="ts" data-nb-lang="ts"><code><span class="line"><span class="nb-shiki-1itgoe">const</span><span class="nb-shiki-dzsirb"> connection</span><span class="nb-shiki-1itgoe"> =</span><span class="nb-shiki-1itgoe"> await</span><span class="nb-shiki-140thh"> env.</span><span class="nb-shiki-dzsirb">BROWSER</span><span class="nb-shiki-140thh">.</span><span class="nb-shiki-1t8gfj">launch</span><span class="nb-shiki-140thh">({</span></span> <span class="line"><span class="nb-shiki-140thh"> outboundByHost: {</span></span> <span class="line"><span class="nb-shiki-mdbnqw"> "private.example.test"</span><span class="nb-shiki-140thh">: env.</span><span class="nb-shiki-dzsirb">OUTBOUND</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-140thh"> },</span></span> <span class="line"><span class="nb-shiki-140thh">});</span></span></code></pre></figure></div></div></div><script type="module" src="https://developers.cloudflare.com/home/runner/work/cloudflare-docs/cloudflare-docs/src/components/ui/tabs/Tabs.astro?astro&type=script&index=0&lang.ts"></script></div> <p>Use <code>connectSession(sessionId)</code> when you need to acquire and connect in separate steps. The method returns a session-pinned <code>webSocket</code> Fetcher for a CDP client.</p> <p>The binding also includes session methods for Live View, active sessions, session history, limits, session details, and cleanup. The nested <code>devtools</code> binding provides typed methods for browser version information, protocol descriptions, and target operations such as listing, creating, activating, and closing targets.</p> <p>Refer to the <a href="https://developers.cloudflare.com/browser-run/reference/browser-binding-api/">Browser binding API documentation</a> for method signatures and the <a href="https://developers.cloudflare.com/browser-run/features/outbound-workers/">outbound Worker feature guide</a> for routing examples.</p>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.