Welcome Guest Search | Active Topics | Sign In | Register

How can I get when all frames are completed loaded? Options
Codango
Posted: Saturday, August 20, 2016 12:17:36 AM
Rank: Newbie
Groups: Member

Joined: 8/20/2016
Posts: 1
I tested EO.WebBrowser with some url(http://www.fifa1818.com/sports)

I want to get when the site is completed loaded.
the site has some frames and iframes.

So I use LoadCompleted Event, but LoadCompleted Event was triggered before frames and iframes are loaded.

LoadCompleted Event triggered (http://www.fifa1818.com/sports) -> BeforeRequestLoad (frame, iframe urls)

How can I get when the site(include all frames) is completed loaded?
eo_support
Posted: Thursday, August 25, 2016 9:38:29 PM
Rank: Administration
Groups: Administration

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

There is no built in way to do that because the child frame can be created dynamically. For example, if you have a window that keeps creating new iframe and load Urls, then the LoadCompleted event will never be fired if it were to wait for all iframe to finish.

One way that you can detect whether all iframes have finished loading is:

1. Set WebView.JSInitCode to something that subscribes to window.onload and set a flag to mark that particular window has finished loading;
2. Use WebView.EvalScript to call JavaScript code to walk through all iframes and check this flag to see if all of them are set;
3. Use a timer to run step 2 until all frames have finished loading;

Hope this helps. Please feel free to let us know if you have any more question.

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.