Skip to content

Firing customEvents with ExecuteScriptAsync() #4130

Closed Answered by Antix-Development
Antix-Development asked this question in Q&A
Discussion options

You must be logged in to vote

Okay well I never thought the day would come, but ChatGPT actually solved a programming problem for me!! Here's what they had had to say when I asked them...

It seems like you're trying to create and dispatch a custom "windowresize" event in a WebView2 control using C# and JavaScript, but it's not working as expected. There might be a small issue in your code. Here's a possible solution:

  • Ensure that you are calling the DispatchWindowResizeEvent method correctly from your C# code.
  • In your JavaScript code, make sure you're correctly listening for the custom "windowresize" event.

Here's an updated version of your code with some corrections:

C# Code (hosted object):

public void DispatchWin…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Antix-Development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant