|
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.
|
|
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.aspx4. Inside your JavaScript extension function, calls ShowDevTools; This will cause ShowDevTools to be called after the page has finished loading. Thanks!
|
|
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.
|
|
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.aspxThanks!
|
|
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".
|
|
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!
|
|