2498e8d1c2
* chore: make aliasify work on .ts files as well * refactor: Port ipc-renderer-internal to TypeScript * refactor: Correctly import internal ipcRenderer * refactor: One more rename * refactor: Fix one more lint issue * refactor: Correctly reference ipcRendererInternal
23 lines
902 B
JavaScript
23 lines
902 B
JavaScript
'use strict'
|
|
|
|
/* global nodeProcess, isolatedWorld */
|
|
|
|
const atomBinding = require('@electron/internal/common/atom-binding-setup').atomBindingSetup(nodeProcess.binding, 'renderer')
|
|
|
|
const v8Util = atomBinding('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)
|
|
}
|
|
|
|
const isolatedWorldArgs = v8Util.getHiddenValue(isolatedWorld, 'isolated-world-args')
|
|
|
|
if (isolatedWorldArgs) {
|
|
const { ipcRendererInternal, guestInstanceId, isHiddenPage, openerId, usesNativeWindowOpen } = isolatedWorldArgs
|
|
const { windowSetup } = require('@electron/internal/renderer/window-setup')
|
|
windowSetup(ipcRendererInternal, guestInstanceId, openerId, isHiddenPage, usesNativeWindowOpen)
|
|
}
|