electron-cdp-utils
v0.0.21
Published
This is a library that makes it easier to use CDP (Chrome DevTools Protocol) in Electron.
Downloads
161
Readme
electron-cdp-utils
This is a library that makes it easier to use CDP (Chrome DevTools Protocol) in Electron.
Usage
import { attach } from 'electron-cdp-utils';
const window = new BrowserWindow(...);
...
const session = await attach(window.webContents);
await session.send('Page.enable');
await session.send('Page.setBypassCSP', { enabled: true });
await window.webContents.cdp.send('Page.enable');
await window.webContents.cdp.send('Page.setBypassCSP', { enabled: true });
import { Session } from 'electron-cdp-utils';
const window = new BrowserWindow(...);
...
const session = new Session(window.webContents);
await session.send('Page.enable');
await session.send('Page.setBypassCSP', { enabled: true });