You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using .Net core winforms with webview2. When I call CoreWebView2.PostWebMessageAsString , I got error :
VM7:1 Uncaught TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.
at EmbeddedBrowserWebView.<anonymous> (<anonymous>:1:40673)
in below code, which is coming from webview2 implementation:
embeddedBrowserWebView.addEventListener("message", native_event=>{
if (logNativeEvent)
console.log("native event:", native_event);
let eventArg = new Event("message");
Object.defineProperty(eventArg, 'data', {
value: JSON.parse(native_event.data)
});
Object.defineProperty(eventArg, 'source', {
value: webview
});
webview.dispatchEvent(eventArg);
So I think object Event is conflicting with one of own classes, which is not possible to change. What is possible to do? Is it possible to modify webview2 JS to use another name for Event class?
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
No response
SDK Version
No response
Framework
Winforms
Operating System
Windows 10
OS Version
No response
Repro steps
create winform application using our client
Repros in Edge Browser
No
Regression
No, this never worked
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered:
What happened?
I am using .Net core winforms with webview2. When I call CoreWebView2.PostWebMessageAsString , I got error :
in below code, which is coming from webview2 implementation:
So I think object Event is conflicting with one of own classes, which is not possible to change. What is possible to do? Is it possible to modify webview2 JS to use another name for Event class?
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
No response
SDK Version
No response
Framework
Winforms
Operating System
Windows 10
OS Version
No response
Repro steps
create winform application using our client
Repros in Edge Browser
No
Regression
No, this never worked
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: