JavascriptResponse.Result = null #4215
Unanswered
reinholdbehringer
asked this question in
Q&A
Replies: 1 comment 2 replies
-
It seems that this problem has solved itself... I have no idea what is different., but this morning when I tried the identical code, it worked OK, and the response.Result had the desired return value from the JavaScript function. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
this is an excellent and very powerful tool! But I ran into some trouble:
I am trying to replace the olde C# webbrowser control with this CefSharp webbrowser, but I ran into difficulties using Javascript functions which are already in an HTML page that I am loading with this browser.
The previous C# webbrower control could just use the HtmlDocument.InvokeScript(functionName, parameters), where functionName is the name of the Javascript function. Areturn value was then returned as s string and could be used further in C#.
But with this Cef I have trouble achieving the same.
I am using in C#:
JavascriptResponse response = await chromeBrowser.EvaluateScriptAsync(functionName);
The response.Success is true, but response.Result is always null or empty. I checked in the JavaScript, and there is a valid return value, but it seems not to reach C#.
What do I need to do to get the correct return value of my JavaScript function into C# when calling this function from within my C# code?
Cheers,
Reinhold
Beta Was this translation helpful? Give feedback.
All reactions