puppeteer/docs/api/puppeteer.browsercontext.isincognito.md

26 lines
1.0 KiB
Markdown
Raw Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: BrowserContext.isIncognito
---
# BrowserContext.isIncognito() method
2024-02-21 12:52:58 +00:00
> Warning: This API is now obsolete.
>
2024-04-09 10:36:02 +00:00
> In Chrome, the [default browser context](./puppeteer.browser.defaultbrowsercontext.md) can also be "incognito" if configured via the arguments and in such cases this getter returns wrong results (see https://github.com/puppeteer/puppeteer/issues/8836). Also, the term "incognito" is not applicable to other browsers. To migrate, check the [default browser context](./puppeteer.browser.defaultbrowsercontext.md) instead: in Chrome all non-default contexts are incognito, and the default context might be incognito if you provide the `--incognito` argument when launching the browser.
2024-02-21 12:52:58 +00:00
Whether this [browser context](./puppeteer.browsercontext.md) is incognito.
In Chrome, the [default browser context](./puppeteer.browser.defaultbrowsercontext.md) is the only non-incognito browser context.
2022-07-05 13:41:43 +00:00
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class BrowserContext {
abstract isIncognito(): boolean;
2022-07-05 13:41:43 +00:00
}
```
**Returns:**
boolean