Welcome Guest Search | Active Topics | Sign In | Register

The WebView JSExtInvoke event no longer working in EO 2020 Options
Gregory Riggs
Posted: Thursday, March 19, 2020 6:35:12 PM
Rank: Newbie
Groups: Member

Joined: 3/19/2020
Posts: 5
Hello,

I'm looking at upgrading from EO 2017 to EO 2020, and I noticed the WebView's JSExtInvoke is no longer working; our event handlers are never being called when our Angular JavaScript code attempts to make a callback into our C# code.

Is this a known breaking change?
Any ideas or suggestions how to get the JSExtInvoke event working again?

Thanks & Regards,
Greg
eo_support
Posted: Friday, March 20, 2020 1:29:47 PM
Rank: Administration
Groups: Administration

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

We are not aware of any issue with JSExtInvoke. You may want to use the built-in debugger feature to debug your JavaScript code to make sure that it is called:

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

Thanks!
Gregory Riggs
Posted: Monday, March 23, 2020 4:08:43 PM
Rank: Newbie
Groups: Member

Joined: 3/19/2020
Posts: 5
Thank you for the tip about the built-in debugger feature; that was very helpful!

We are using C# Windows Forms, and our Angular code was doing this:

declare var EOWebBrowser: any;
EOWebBrowser.ExtInvoke(...

When I used the built-in debugger, I was able to see in the console that we are getting the error:

Error: Exception Thrown by ...:: eoWebBrowser is not defined

I couldn't find EOWebBrowser related to extInvoke in the EO documentation, so I'm unsure where we obtained that from?

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

I changed our code to the following to match what I see in the EO documentation which fixed the problem for us.

declare var eoapi: any;
eoapi.extInvoke(...

Thanks!
Greg
eo_support
Posted: Tuesday, March 24, 2020 10:58:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Glad to hear that you got it working. Yes. eoWebBrowser only exists in early versions. The current version uses eoapi.


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.