Another dumb question. I want to get the HTML text for the web page
that is being displayed in my WebView. I found a code snippet in
the archives that does that, but I need to know when all of the
data has been loaded.
Another search led me to:
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame*)
frame
If I register as the FrameLoadDelegate so I receive these calls,
then when (frame == [myWebView mainFrame]) is the loading complete?
I tried this with ebay.com and I saw one call to
didFinishLoadForFrame AFTER I had received the one that had the
mainFrame ID, so I am suspicious of my approach. It looks like I
got all of the data by copying it when I saw mainFrame, but there
are race conditions galore.
The only other approach I can see is to count calls to
webView:didCommitLoadForFrame and count down calls to
webView:didFinishLoadForFrame and
webView:didFailLoadWithError:forFrame and whenever they go to zero
I conclude that a page load has completed.
Does anyone have a definitive answer?
Each frame is independent.
So if you need to know when all frames are loaded, you will need to
keep count.
-- Darin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden