electron/lib/isolated_renderer/init.js

16 lines
535 B
JavaScript
Raw Normal View History

2020-03-20 20:28:31 +00:00
'use strict';
/* global nodeProcess, isolatedWorld */
2020-03-20 20:28:31 +00:00
process.electronBinding = require('@electron/internal/common/electron-binding-setup').electronBindingSetup(nodeProcess._linkedBinding, 'renderer');
2020-03-20 20:28:31 +00:00
const v8Util = process.electronBinding('v8_util');
2020-03-20 20:28:31 +00:00
const webViewImpl = v8Util.getHiddenValue(isolatedWorld, 'web-view-impl');
if (webViewImpl) {
// Must setup the WebView element in main world.
2020-03-20 20:28:31 +00:00
const { setupWebView } = require('@electron/internal/renderer/web-view/web-view-element');
setupWebView(v8Util, webViewImpl);
}