Welcome Guest Search | Active Topics | Sign In | Register

JavaScript Extension return value Options
alex
Posted: Monday, December 23, 2019 9:56:00 PM
Rank: Newbie
Groups: Member

Joined: 11/22/2018
Posts: 6
Is it possible get return value from Javascript extension ?

javascript :

let text = getText();

c#

webView1.RegisterJSExtensionFunction("getText", new JSExtInvokeHandler(WebView_JSGetText))

string WebView_JSGetText(object sender, JSExtInvokeArgs e)
{
return "text"
}

like this
eo_support
Posted: Tuesday, December 24, 2019 9:24:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

You would do this in your WebView_JSGetText:

Code: C#
e.ReturnValue = "text";


Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.