Welcome Guest Search | Active Topics | Sign In | Register

Exposing .net class to Jscript Options
dt
Posted: Friday, May 12, 2017 7:28:35 PM
Rank: Newbie
Groups: Member

Joined: 5/11/2017
Posts: 2
How do I expose a .net class to Jscript? I see that you provide way to expose a function but I don't see anything class. Do you have similar function as CefSharp ChromiumWebBrowser.RegisterJsObject

Thanks
eo_support
Posted: Monday, May 15, 2017 3:34:22 PM
Rank: Administration
Groups: Administration

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

There is no direct equivalent of RegisterJSObject in EO.WebBrowser. You can only register JS function, not object. See here for more details:

https://www.essentialobjects.com/doc/webbrowser/advanced/jsext.aspx

Thanks!
ruk
Posted: Monday, May 15, 2017 3:54:30 PM
Rank: Advanced Member
Groups: Member

Joined: 5/15/2017
Posts: 48
We are migrating from CefSharp to EO.WebBrowser. Our code currently use ChromiumWebBrowser.RegisterJsObject to bind .net objects. Do you have code sample on how to do similar in EO?
eo_support
Posted: Monday, May 15, 2017 4:07:48 PM
Rank: Administration
Groups: Administration

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

You will need to rewrite that part of code to dispatch your calls through JSExtInvoke event as mentioned in link provided in our previous reply.

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.