views:

133

answers:

1

As we know , When we load frame from webpage of safari, we will invoke the delegate methods of webkit informal protocol(WebFrameLoadDelegate):

webView:didStartProvisionalLoadForFrame:

webView:didChangeLocationWithinPageForFrame:

But I want to know whick class and methods will be invoked when reload a webpage or open a new webpage in safari ? Thank you very much!

+1  A: 

The same delegates are called, you just need to check that the webFrame that is sending this delegate message is the mainFrame by checking that it has no parent. For example:

- (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame {
    if(![frame parentFrame]) {
        // There is no parent frame so this is the main frame.
    }
    // other actions for child frames.
}
Abizern
First thank you very much! Now I have another question: Can I get the flash address in the webpage using the argu: frame . and a flash in a frame ? and How to get it , I thought maybe Traversal all the every frame dom object? Thank you again!
jin
That's a completely different question.
Abizern