Skip navigation.
 
mlRe: [WebFrame url] -- How to get the initial URL from WebView or WebFrame?
FROM : Jeff Johnson
DATE : Sat Nov 03 18:15:43 2007

On Nov 3, 2007, at 3:12 AM, Claus Atzenbeck wrote:

> Hi all:
>
> I have a WebView and need to get the URL from the Web page currently
> shown.
>
> [WebFrame reload], for example, passes "the initial request [...] 
> as an
> argument to loadRequest:". How would I get this initial request as 
> NSURL
> or NSString?
>
> Cheers,
> Claus


Claus,

Try [[[WebFrame dataSource] request] URL].  You can also try 
[[[WebFrame dataSource] initialRequest] URL], but the URL of the 
initial request may be different from the URL of the web page 
currently shown.

-Jeff

Related mailsAuthorDate
ml[WebFrame url] -- How to get the initial URL from WebView or WebFrame? Claus Atzenbeck Nov 3, 09:12
mlRe: [WebFrame url] -- How to get the initial URL from WebView or WebFrame? Jeff Johnson Nov 3, 18:15
mlRe: [WebFrame url] -- How to get the initial URL from WebView or WebFrame? Claus Atzenbeck Nov 4, 10:53