chore: cleanup typings/internal-electron.d.ts (#25711)

This commit is contained in:
Milan Burda 2020-10-02 04:52:29 +02:00 committed by GitHub
parent 17c7c5cfdd
commit 8df4faa8f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 76 deletions

View file

@ -85,8 +85,7 @@ const registerWebViewElement = (v8Util: NodeJS.V8UtilBinding, webViewImpl: typeo
webViewImpl.setupMethods(WebViewElement);
// The customElements.define has to be called in a special scope.
const webFrame = webViewImpl.webFrame as ElectronInternal.WebFrameInternal;
webFrame.allowGuestViewElementDefinition(window, () => {
webViewImpl.webFrame.allowGuestViewElementDefinition(window, () => {
window.customElements.define('webview', WebViewElement);
(window as any).WebView = WebViewElement;