mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
docs: fix did-frame-navigate example in webFrameMain docs (#34419)
docs: fix did-frame-navigate example in webFrameMain docs
This commit is contained in:
@@ -16,7 +16,7 @@ win.loadURL('https://twitter.com')
|
|||||||
|
|
||||||
win.webContents.on(
|
win.webContents.on(
|
||||||
'did-frame-navigate',
|
'did-frame-navigate',
|
||||||
(event, url, isMainFrame, frameProcessId, frameRoutingId) => {
|
(event, url, httpResponseCode, httpStatusText, isMainFrame, frameProcessId, frameRoutingId) => {
|
||||||
const frame = webFrameMain.fromId(frameProcessId, frameRoutingId)
|
const frame = webFrameMain.fromId(frameProcessId, frameRoutingId)
|
||||||
if (frame) {
|
if (frame) {
|
||||||
const code = 'document.body.innerHTML = document.body.innerHTML.replaceAll("heck", "h*ck")'
|
const code = 'document.body.innerHTML = document.body.innerHTML.replaceAll("heck", "h*ck")'
|
||||||
|
|||||||
Reference in New Issue
Block a user