Welcome Guest Search | Active Topics | Sign In | Register

JSInitCode/JSExtInvoke issues with 2015 release? Options
Jason R.
Posted: Friday, June 26, 2015 12:26:21 PM
Rank: Member
Groups: Member

Joined: 6/12/2015
Posts: 20
Ever since upgrading to the latest release, I've noticed a issue that happens on some occassions for no obvious reason.

I set JSInitCode like so (I set it after WebView Create and ALSO Before each LoadUrl method call):

Webview1.JSInitCode = "if (addEventListener) {window.addEventListener('click',function(event) { return eoWebBrowser.extInvoke('qwbclick', [event]); }, false);} else {window.attachEvent('onclick',function(event) { return eoWebBrowser.extInvoke('qwbclick', [event]);});} "

The JSExtInvoke event is typically being fired without any issues. But sometimes, for no obvious reason, it stops firing. Their is no Javascript code in the HTML webpage that is doing anything with the event handlers, so It can't be that the eventhandler is being removed.

If I call the LoadUrl method to load the exact same URL, it does not fix it. HOWEVER, doing a right-click "Reload" DOES fix it.


- Could it be a JavaScript exception of some sort that is causing further JS to stop executing?

- Could it be a issue with the JSInitCode not applying or being lost somehow?

- Could it be eoWebBrowser.extInvoke is having issues?



My JSExtInvoke event code is wrapped in a try/catch, so it's not like a error in my code is causing the JSExtInvoke to stop firing.

Again, this issue is new to the new release.
eo_support
Posted: Friday, June 26, 2015 12:40:03 PM
Rank: Administration
Groups: Administration

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

Can you isolate the problem into a test project so that we can take a look? Please see instructions for test project here:

http://www.essentialobjects.com/forum/test_project.aspx

Thanks!
Jason R.
Posted: Friday, June 26, 2015 12:50:10 PM
Rank: Member
Groups: Member

Joined: 6/12/2015
Posts: 20
Not easily.

I have created a wrapper for the EO.WebBrowser in .NET for COM Interop in a VB6 project for backwards compatibility, and the webpage being displayed is on a internal server.

I will do some testing to see if:
a) I can reproduce issue in a non-wrapped environment (i.e. using WebView directly in a VB.NET form, not via a COM Interop wrapper)

b) I can reproduce this on just any web-page.

Problem is, I don't know what is leading up to the point of failure. It's so random.

I will say this though: I am using the WebView.Create method to create the webview within a window handle of the parent process, and that window is hidden/shown very frequently. I sortof have a feeling that it may have something to do with the window being hidden and re-shown.
eo_support
Posted: Friday, June 26, 2015 1:27:43 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Jason R. wrote:

I will say this though: I am using the WebView.Create method to create the webview within a window handle of the parent process, and that window is hidden/shown very frequently. I sortof have a feeling that it may have something to do with the window being hidden and re-shown.


This is exactly why we need a test project from you. :) There are a million different scenarios out there, so without a test project it would be completely shooting in the dark for us. It is not practical for us to troubleshoot that way. As such for this kind of issues we always ask for a test app first. Hope you understand.
Jason R.
Posted: Monday, June 29, 2015 1:00:34 PM
Rank: Member
Groups: Member

Joined: 6/12/2015
Posts: 20
I've narrowed this down to a very unusual case.

I am able to reproduce this issue very easily. I'll post in the test Projects for you to see
eo_support
Posted: Monday, June 29, 2015 3:33:08 PM
Rank: Administration
Groups: Administration

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

We have confirmed this to be a problem on our end. We will provide an update build to you as soon as possible.

Thanks!
Jason R.
Posted: Monday, June 29, 2015 4:22:49 PM
Rank: Member
Groups: Member

Joined: 6/12/2015
Posts: 20
Thanks -- Any ETA?
eo_support
Posted: Tuesday, June 30, 2015 9:02:37 PM
Rank: Administration
Groups: Administration

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

This is just to let you know that we have posted a new build that should resolve this issue. You can download the new build from our download page.

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.