6cd75744ef
* refactor: Port window-setup to TS * refactor: Make the linter happy * refactor: Sneaky little TS error * refactor: Correctly import window-setup * refactor: Implement feedback <3 * refactor: Allow decorators in TS * refactor: Use named windowSetup in isolatedRenderer * refactor: Help TS understand * refactor: Welp, use createEvent again * refactor: Use the correct target in the decorator
23 lines
886 B
JavaScript
23 lines
886 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 { ipcRenderer, guestInstanceId, isHiddenPage, openerId, usesNativeWindowOpen } = isolatedWorldArgs
|
|
const { windowSetup } = require('@electron/internal/renderer/window-setup')
|
|
windowSetup(ipcRenderer, guestInstanceId, openerId, isHiddenPage, usesNativeWindowOpen)
|
|
}
|