mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: make raw requires type-safe (#29006)
* chore: make raw requires type-safe * refactor: no need for separate webViewImplModule * refactor: no need for separate guestViewInternalModule
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
/* global nodeProcess, isolatedWorld */
|
||||
|
||||
import type * as webViewElementModule from '@electron/internal/renderer/web-view/web-view-element';
|
||||
|
||||
process._linkedBinding = nodeProcess._linkedBinding;
|
||||
|
||||
const v8Util = process._linkedBinding('electron_common_v8_util');
|
||||
@@ -8,6 +10,6 @@ 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 { setupWebView } = require('@electron/internal/renderer/web-view/web-view-element') as typeof webViewElementModule;
|
||||
setupWebView(v8Util, webViewImpl as any);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user