Beta: give a sandbox its own window of the browser, or, with no sandbox, open a.
func (
r *SandboxBrowserAttachmentService) New(ctx context.Context,
name string,
body SandboxBrowserAttachmentNewParams,
opts ...option.RequestOption) (res *BrowserAttachment,
err error
)Beta: give a sandbox its own window of the browser, or, with no sandbox, open a window for the person calling (or, with controller "agent", for a client to drive over api_cdp_url). The response's cdp_url is the Chrome DevTools endpoint the sandbox connects to, and api_cdp_url the same endpoint through the API; a client can open more tabs, which stay in its window. Windows share the browser's cookies and logins. Keeping each sandbox to its own window is best effort, not a security boundary: attach only sandboxes you would trust with every login in the browser. With share_localhost, the browser can also reach the servers the sandbox runs, at the response's localhost_alias. Attaching takes, for the browser and for the attached sandbox each, being its creator or a role with sandboxes:exec. With unrestricted, nothing is filtered: the window's CDP clients (its sandbox, or anyone using its api_cdp_url) get the whole browser, including people's windows, every site's cookies, and commands that close it. It needs nothing beyond what any attach needs.
| Name | Type | Description |
|---|---|---|
ctx* | context.Context | |
name* | string | |
body* | SandboxBrowserAttachmentNewParams | |
opts* | ...option.RequestOption |