Browser Run adds session and DevTools methods to browser bindings
Browser Run now provides typed methods for session management and DevTools operations, including acquire, launch, and connectSession methods with support for outbound routing through Workers. You can manage sessions, create Live View URLs, and perform target operations without manual HTTP requests.
Browser Run 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.
The new acquire() and launch() methods also accept outboundByHost. This lets you route requests for selected hostnames through another Worker, including a Worker that adds authentication or reaches a private service.
const connection = await env.BROWSER.launch({
outboundByHost: {
"private.example.test": env.OUTBOUND,
},
});const connection = await env.BROWSER.launch({
outboundByHost: {
"private.example.test": env.OUTBOUND,
},
});
Use connectSession(sessionId) when you need to acquire and connect in separate steps. The method returns a session-pinned webSocket Fetcher for a CDP client.
The binding also includes session methods for Live View, active sessions, session history, limits, session details, and cleanup. The nested devtools binding provides typed methods for browser version information, protocol descriptions, and target operations such as listing, creating, activating, and closing targets.
Refer to the Browser binding API documentation for method signatures and the outbound Worker feature guide for routing examples.
Source: original entry ↗
More from Cloudflare
Follow Cloudflare to get its new changes in your feed and email digest.
Cloudflare One Client for Windows hotfix - trusted certificate chains
A new GA release for Windows Cloudflare One Client is available, addressing an issue with building trusted certificate chains.
Cloudflare One Client for macOS - Trusted Certificate Chain Fix
A new GA release of the macOS Cloudflare One Client is available. This hotfix addresses an issue with building trusted certificate chains.
Cloudflare One Client for Linux
A new GA release of Cloudflare One Client for Linux is now available. This hotfix addresses an issue with building trusted certificate chains.