mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* refactor: port parts of window-setup to use ctx bridge instead of being run in the main world (#23194) * refactor: port parts of window-setup to use ctx bridge instead of being run in the main world * chore: update ctx bridge specs for new base numbers * refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235) * refactor: port window.open and window.opener to use ctx bridge instead of hole punching * refactor: only run the isolated init bundle when webview is enabled
16 lines
535 B
JavaScript
16 lines
535 B
JavaScript
'use strict';
|
|
|
|
/* global nodeProcess, isolatedWorld */
|
|
|
|
process.electronBinding = require('@electron/internal/common/electron-binding-setup').electronBindingSetup(nodeProcess._linkedBinding, 'renderer');
|
|
|
|
const v8Util = process.electronBinding('v8_util');
|
|
|
|
const webViewImpl = v8Util.getHiddenValue(isolatedWorld, 'web-view-impl');
|
|
|
|
if (webViewImpl) {
|
|
// Must setup the WebView element in main world.
|
|
const { setupWebView } = require('@electron/internal/renderer/web-view/web-view-element');
|
|
setupWebView(v8Util, webViewImpl);
|
|
}
|