mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: window.open not overriding parent's webPreferences (#32057)
* fix: window.open not overriding parent's webPreferences * test: remove "nativeWindowOpen: false" from renderer tests
This commit is contained in:
@@ -500,6 +500,14 @@ class WebFrameRenderer : public gin::Wrappable<WebFrameRenderer>,
|
||||
// NOTE: openerId is internal-only.
|
||||
return gin::ConvertToV8(isolate, prefs.opener_id);
|
||||
} else if (pref_name == "isWebView") {
|
||||
// FIXME(zcbenz): For child windows opened with window.open('') from
|
||||
// webview, the WebPreferences is inherited from webview and the value
|
||||
// of |is_webview| is wrong.
|
||||
// Please check ElectronRenderFrameObserver::DidInstallConditionalFeatures
|
||||
// for the background.
|
||||
auto* web_frame = render_frame->GetWebFrame();
|
||||
if (web_frame->Opener())
|
||||
return gin::ConvertToV8(isolate, false);
|
||||
return gin::ConvertToV8(isolate, prefs.is_webview);
|
||||
} else if (pref_name == options::kHiddenPage) {
|
||||
// NOTE: hiddenPage is internal-only.
|
||||
|
||||
Reference in New Issue
Block a user