views:

102

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:

and I know when reload the page I can do this:

- (void)webView:(WebView *)senderdidStartProvisionalLoadForFrame:(WebFrame *)frame {
    if(![frame parentFrame]) {
        // There is no parent frame so this is the main frame.
    }
    // other actions for child frames.
}

Now I have 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 walk through all the every frame dom object? But how to do ?Thank you again!

+2  A: 

You really ought to be clearer. It sounds like you're loading a webpage containing a Flash plug-in and you want to know the URL of that resource. But I'm not sure. If so, you want the WebResourceLoadDelegate, which will tell you what resources the webpage references, including the Flash file.

Mike Abdullah
Firstly thank you very much! Yes, as you say , I want to develop a plug-in wanting to know the URL of a webpage containing Flashs. And WebFrameLoadDelegate has not the method for getting URL? I think flash maybe a frame , doesn't it ?
jin