Hi @john zyd ,
I think, this JS can return the results correctly by using Fetch API, and work in dev-tools, but fail when returning the result by using ExecuteScriptAsync()
function in C#.
This should be related to the encoding. As you can see the Remarks for ExecuteScriptAsync()
function: “If the result is undefined
, contains a reference cycle, or otherwise is not able to be encoded into JSON, the JSON null
value is returned as the null
string.”
I suggest you can also start a new thread(send a feedback) here: GitHub MicrosoftEdge/WebView2Feedback – Issues.
Best Regards,
Tianyu
- If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.