Process: Main
This class is not exported from the 'electron'
module. It is only available as a return value of other methods in the Electron API.
Chrome Developer Tools has a special binding available at JavaScript runtime that allows interacting with pages and instrumenting them.
const { BrowserWindow } = require('electron')
const win = new BrowserWindow()
try {
win.webContents.debugger.attach('1.1')
} catch (err) {
console.log('Debugger attach failed : ', err)
}
win.webContents.debugger.on('detach', (event, reason) => {
console.log('Debugger detached due to : ', reason)
})
win.webContents.debugger.on('message', (event, method, params) => {
if (method === 'Network.requestWillBeSent') {
if (params.request.url === 'https://www.github.com') {
win.webContents.debugger.detach()
}
}
})
win.webContents.debugger.sendCommand('Network.enable')
Emitted when the debugging session is terminated. This happens either when webContents
is closed or devtools is invoked for the attached webContents
.
Emitted whenever the debugging target issues an instrumentation event.
Attaches the debugger to the webContents
.
Returns boolean
- Whether a debugger is attached to the webContents
.
Detaches the debugger from the webContents
.
Returns Promise<any>
- A promise that resolves with the response defined by the 'returns' attribute of the command description in the remote debugging protocol or is rejected indicating the failure of the command.
Send given command to the debugging target.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4