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

docs: fix did-frame-navigate example in webFrameMain docs

Co-authored-by: Will Anderson <will@itsananderson.com>
This commit is contained in:
trop[bot]
2022-06-06 11:20:05 -04:00
committed by GitHub
parent c47b196d02
commit 4b8885ffc8

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")'