docs: fix did-frame-navigate example in webFrameMain docs (#34419)

docs: fix did-frame-navigate example in webFrameMain docs
This commit is contained in:
Will Anderson 2022-06-05 22:49:14 -07:00 committed by GitHub
parent f39c1a35e5
commit 4f99e3e46c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,7 @@ win.loadURL('https://twitter.com')
win.webContents.on(
'did-frame-navigate',
(event, url, isMainFrame, frameProcessId, frameRoutingId) => {
(event, url, httpResponseCode, httpStatusText, isMainFrame, frameProcessId, frameRoutingId) => {
const frame = webFrameMain.fromId(frameProcessId, frameRoutingId)
if (frame) {
const code = 'document.body.innerHTML = document.body.innerHTML.replaceAll("heck", "h*ck")'