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?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
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!
|