← Back to Target domain
Target.createBrowserContext
Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
one.
Domain: Target
stable
Parameters
| Name | Type | Description |
disposeOnDetach (optional) | boolean | If specified, disposes this context when debugging session disconnects. |
proxyServer (optional) | string | Proxy server, similar to the one passed to --proxy-server |
proxyBypassList (optional) | string | Proxy bypass list, similar to the one passed to --proxy-bypass-list |
originsWithUniversalNetworkAccess (optional) | array | An optional list of origins to grant unlimited cross-origin access to.
Parts of the URL other than those constituting origin are ignored. |
Returns
| Name | Type | Description |
browserContextId | Browser.BrowserContextID | The id of the context created. |
Example Request
{
"id": 1,
"method": "Target.createBrowserContext"
}
Example Response
{
"id": 1,
"result": {
"browserContextId": "browserContextId-value"
}
}
Usage in Node.js
const result = await send('Target.createBrowserContext');
console.log(result);
// {"browserContextId": "browserContextId-value"}