2017-01-12 00:36:59 +00:00
|
|
|
'use strict'
|
|
|
|
|
2018-12-13 21:25:12 +00:00
|
|
|
/* global nodeProcess, isolatedWorld */
|
2018-09-22 12:28:50 +00:00
|
|
|
|
2019-04-26 09:55:12 +00:00
|
|
|
process.electronBinding = require('@electron/internal/common/atom-binding-setup').electronBindingSetup(nodeProcess._linkedBinding, 'renderer')
|
2017-01-12 00:36:59 +00:00
|
|
|
|
2019-03-30 01:10:21 +00:00
|
|
|
const v8Util = process.electronBinding('v8_util')
|
|
|
|
|
|
|
|
// The `lib/renderer/ipc-renderer-internal.js` module looks for the ipc object in the
|
|
|
|
// "ipc-internal" hidden value
|
|
|
|
v8Util.setHiddenValue(global, 'ipc-internal', v8Util.getHiddenValue(isolatedWorld, 'ipc-internal'))
|
2019-01-22 01:08:16 +00:00
|
|
|
|
|
|
|
const webViewImpl = v8Util.getHiddenValue(isolatedWorld, 'web-view-impl')
|
2019-01-12 01:00:43 +00:00
|
|
|
|
|
|
|
if (webViewImpl) {
|
|
|
|
// Must setup the WebView element in main world.
|
|
|
|
const { setupWebView } = require('@electron/internal/renderer/web-view/web-view-element')
|
|
|
|
setupWebView(v8Util, webViewImpl)
|
|
|
|
}
|
2017-01-12 00:36:59 +00:00
|
|
|
|
2019-01-22 01:08:16 +00:00
|
|
|
const isolatedWorldArgs = v8Util.getHiddenValue(isolatedWorld, 'isolated-world-args')
|
|
|
|
|
|
|
|
if (isolatedWorldArgs) {
|
2019-03-30 01:10:21 +00:00
|
|
|
const { guestInstanceId, isHiddenPage, openerId, usesNativeWindowOpen } = isolatedWorldArgs
|
2019-02-14 13:52:38 +00:00
|
|
|
const { windowSetup } = require('@electron/internal/renderer/window-setup')
|
2019-03-30 01:10:21 +00:00
|
|
|
windowSetup(guestInstanceId, openerId, isHiddenPage, usesNativeWindowOpen)
|
2019-01-22 01:08:16 +00:00
|
|
|
}
|