-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
So i added a webview to my angular
<webview #webview src="https://google.com/" style="width: 100%; height: 100%" allowpopups></webview>And I reference it in my type script using:
export class AppComponent implements AfterViewInit {
@ViewChild('webview') webview: ElementRef;
nativeWebView: WebviewTag;
.
.
.
ngAfterViewInit(): void {
this.nativeWebView = this.webview.nativeElement;
this.nativeWebView.addEventListener('dom-ready', () => {
this.nativeWebView.openDevTools();
});
}
}(sneaky edit: The nativeWebView does actually open the dev tools after this)
But if I then later try to do something like:
reload(): void {
this.nativeWebView.loadURL('https://myurl.com');
}I get the following error:
Uncaught (in promise) Error: Error invoking remote method 'ELECTRON_GUEST_VIEW_MANAGER_CALL':
Error: ERR_FAILED (-2) loading 'https://myurl.com' at EventEmitter.t.ipcRendererInternal.send.t.ipcRendererInternal.invoke (electron/js2c/renderer_init.js:103)
Am I doing something wrong? Or is it borked?