electron/lib/isolated_renderer/init.ts
Milan Burda a043a60b89
refactor: cleanup global variable declarations (#38410)
refactor: eliminate duplicate isolatedApi typing

Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-05-24 20:01:07 +02:00

10 lines
482 B
TypeScript

import type * as webViewElementModule from '@electron/internal/renderer/web-view/web-view-element';
import type { WebViewImplHooks } from '@electron/internal/renderer/web-view/web-view-impl';
declare const isolatedApi: WebViewImplHooks;
if (isolatedApi.guestViewInternal) {
// Must setup the WebView element in main world.
const { setupWebView } = require('@electron/internal/renderer/web-view/web-view-element') as typeof webViewElementModule;
setupWebView(isolatedApi);
}