diff --git a/docs/api/window-open.md b/docs/api/window-open.md index 7d8bfa262db..dd4105675b9 100644 --- a/docs/api/window-open.md +++ b/docs/api/window-open.md @@ -85,15 +85,18 @@ const mainWindow = new BrowserWindow() mainWindow.webContents.setWindowOpenHandler(({ url }) => { if (url === 'about:blank') { return { - frame: false, - fullscreenable: false, - backgroundColor: 'black', - webPreferences: { - preload: 'my-child-window-preload-script.js' + action: 'allow', + overrideBrowserWindowOptions: { + frame: false, + fullscreenable: false, + backgroundColor: 'black', + webPreferences: { + preload: 'my-child-window-preload-script.js' + } } } } - return false + return { action: 'deny' } }) ```