Welcome Guest Search | Active Topics | Sign In | Register

ShowDevTools does not work when set too soon Options
David Robinson
Posted: Wednesday, April 8, 2015 7:51:33 PM
Rank: Advanced Member
Groups: Member

Joined: 4/6/2015
Posts: 33
I have a very simple VB.NET application with form containing a WebView and a DevTools Panel, and URL textbox and a Go button.

The form also has a button to launch a new version of itself and automatically load the URL.

The Panel is set in the WebView's ShowDevTools, immediately after the Url is set.

If the form is brought up and the Go button is clicked, it loads the WebView and the DevTools panel.

However, in "launch" mode, only the WebView gets filled in. The DevTools panel never is filled in.

What Form or WebView event do we have to wait for before setting the Url and the ShowDevTools?

I can submit the test project if desired.

BTW, I am a consultant with Order Processing Technologies, Framingham, MA.

eo_support
Posted: Wednesday, April 8, 2015 8:27:17 PM
Rank: Administration
Groups: Administration

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

You will need to wait until the main WebView finishes initializing before you can call ShowDevTools. To do so you can follow these steps:

1. Set WebView.JSInitCode to some custom JavaScript;
2. Inside your custom JavaScript attach handler to window.onload event. This event will be fired after the document has finished loading;
3. Inside your event handler, calls back into your C# code using JavaScript extension:

http://www.essentialobjects.com/doc/6/advanced/jsext.aspx

4. Inside your JavaScript extension function, calls ShowDevTools;

This will cause ShowDevTools to be called after the page has finished loading.

Thanks!
David Robinson
Posted: Thursday, April 9, 2015 8:20:58 AM
Rank: Advanced Member
Groups: Member

Joined: 4/6/2015
Posts: 33
Hi,
We also sometimes see the WebView come up but the URL never loads.
Is this related or a different problem.
Thanks.
eo_support
Posted: Thursday, April 9, 2015 9:37:30 AM
Rank: Administration
Groups: Administration

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

No. This should not be related. You can isolate the problem into a test project and send the test project to us. Once we have that we will be happy to investigate further. See here for instructions on test project:

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

Thanks!
David Robinson
Posted: Thursday, April 9, 2015 10:50:44 AM
Rank: Advanced Member
Groups: Member

Joined: 4/6/2015
Posts: 33
You don't suppose you could just have a WebView event to say "I'm ready".
eo_support
Posted: Thursday, April 16, 2015 12:12:53 PM
Rank: Administration
Groups: Administration

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

This is just to let you know that we are working on such an event. We are considering extending LoadCompleted event to all request. In the current version LoadCompleted event only occurs for a request that you loaded (either by setting Url or call LoadRequest/LoadUrl). In the next release we may extend it to be fired for all requests.

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.