You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The console will open a subwindow, but in the subwindow the webview did not load, and the console throws error w.document.querySelector(...).reload is not a function
The text was updated successfully, but these errors were encountered:
The previous behavior was actually a security bug, the new-window event does not have the ability to override the webPreferences, it only reuses the WebContents created by Chromium, so the passed webPreferences is actually ignored. The code used to work because the child window inherited the webviewTag: true from parent window directly, which was a bug instead of expected behavior.
The correct way to do it is to use webContents.setWindowOpenHandler API instead:
Preflight Checklist
Electron Version
16.0.5
What operating system are you using?
Windows
Operating System Version
10 version 19043
What arch are you using?
x64
Last Known Working Electron version
16.0.4
Expected Behavior
When a sub window opened with
webviewTag
set to true, the webview in sub window should works correctlyActual Behavior
In the subwindow, the
webviewTag
option is not actually enabled and webview is not workingTestcase Gist URL
https://gist.github.com/72a8040c33a7deeebdfe88d409d8ca0b
Additional Information
In the testcase, type following command in devtool console and press enter:
The console will open a subwindow, but in the subwindow the webview did not load, and the console throws error
w.document.querySelector(...).reload is not a function
The text was updated successfully, but these errors were encountered: