electron/lib/isolated_renderer/init.js
Shelley Vohr 659e79fc08
refactor: prevent consistent early exception (#24191)
* refactor: prevent consistent early exception

* Use _linkedBinding where possible

* Remove dead electronBinding
2020-06-22 20:32:45 -07:00

15 lines
455 B
JavaScript

'use strict';
/* global nodeProcess, isolatedWorld */
process._linkedBinding = nodeProcess._linkedBinding;
const v8Util = process._linkedBinding('electron_common_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);
}