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-01-22 01:08:16 +00:00
|
|
|
const atomBinding = require('@electron/internal/common/atom-binding-setup')(nodeProcess.binding, 'renderer')
|
2017-01-12 00:36:59 +00:00
|
|
|
|
2019-01-22 01:08:16 +00:00
|
|
|
const v8Util = atomBinding('v8_util')
|
|
|
|
|
|
|
|
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) {
|
|
|
|
const { ipcRenderer, guestInstanceId, isHiddenPage, openerId, usesNativeWindowOpen } = isolatedWorldArgs
|
|
|
|
require('@electron/internal/renderer/window-setup')(ipcRenderer, guestInstanceId, openerId, isHiddenPage, usesNativeWindowOpen)
|
|
|
|
}
|