feat(Page): introduce Page.setBypassCSP (#2324)

This patch introduces `page.setBypassCSP` method that allows clients
to ignore Content-Security-Policy for a given page.

Fixes #1229.
This commit is contained in:
Andrey Lushnikov
2018-04-06 16:35:50 -07:00
committed by GitHub
parent dfcee2e631
commit 35e34db198
3 changed files with 57 additions and 0 deletions

View File

@@ -610,6 +610,13 @@ class Page extends EventEmitter {
await this._client.send('Emulation.setScriptExecutionDisabled', { value: !enabled });
}
/**
* @param {boolean} enabled
*/
async setBypassCSP(enabled) {
await this._client.send('Page.setBypassCSP', { enabled });
}
/**
* @param {?string} mediaType
*/