2022-07-05 13:41:43 +00:00
|
|
|
---
|
|
|
|
sidebar_label: BrowserContext.clearPermissionOverrides
|
|
|
|
---
|
|
|
|
|
|
|
|
# BrowserContext.clearPermissionOverrides() method
|
|
|
|
|
2023-09-18 18:11:55 +00:00
|
|
|
Clears all permission overrides for this [browser context](./puppeteer.browsercontext.md).
|
2022-07-05 13:41:43 +00:00
|
|
|
|
2022-10-24 07:07:05 +00:00
|
|
|
#### Signature:
|
2022-07-05 13:41:43 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
class BrowserContext {
|
2023-11-09 12:57:33 +00:00
|
|
|
abstract clearPermissionOverrides(): Promise<void>;
|
2022-07-05 13:41:43 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
Promise<void>
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
2023-09-18 18:11:55 +00:00
|
|
|
Clearing overridden permissions in the [default browser context](./puppeteer.browser.defaultbrowsercontext.md):
|
|
|
|
|
2022-07-05 13:41:43 +00:00
|
|
|
```ts
|
|
|
|
const context = browser.defaultBrowserContext();
|
|
|
|
context.overridePermissions('https://example.com', ['clipboard-read']);
|
|
|
|
// do stuff ..
|
|
|
|
context.clearPermissionOverrides();
|
|
|
|
```
|