2022-08-06 14:49:20 +00:00
|
|
|
---
|
|
|
|
sidebar_label: BrowserContext.clearPermissionOverrides
|
|
|
|
---
|
|
|
|
|
|
|
|
# BrowserContext.clearPermissionOverrides() method
|
|
|
|
|
2023-09-19 13:03:19 +00:00
|
|
|
Clears all permission overrides for this [browser context](./puppeteer.browsercontext.md).
|
2022-08-06 14:49:20 +00:00
|
|
|
|
2022-10-24 14:31:12 +00:00
|
|
|
#### Signature:
|
2022-08-06 14:49:20 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
class BrowserContext {
|
2023-11-15 10:48:54 +00:00
|
|
|
abstract clearPermissionOverrides(): Promise<void>;
|
2022-08-06 14:49:20 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
Promise<void>
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
2023-09-19 13:03:19 +00:00
|
|
|
Clearing overridden permissions in the [default browser context](./puppeteer.browser.defaultbrowsercontext.md):
|
|
|
|
|
2022-08-06 14:49:20 +00:00
|
|
|
```ts
|
|
|
|
const context = browser.defaultBrowserContext();
|
|
|
|
context.overridePermissions('https://example.com', ['clipboard-read']);
|
|
|
|
// do stuff ..
|
|
|
|
context.clearPermissionOverrides();
|
|
|
|
```
|