Re: WebView: Open new windows in default browser
Re: WebView: Open new windows in default browser
- Subject: Re: WebView: Open new windows in default browser
- From: Benjamin Dobson <email@hidden>
- Date: Thu, 23 Oct 2008 16:16:08 +0100
On 23 Oct 2008, at 01:09:07, <email@hidden> <email@hidden
> wrote:
I've been trying to get a WebView to open in the user's default
browser. In fact, I've succeeded, but it's rather clunky,
and I'm wondering if there's a better way.
Why not simply add "target=_'blank'" to your URLs? No WebView
hacking needed.
<a href="http://my.external.url" title="What the user sees"
target="_blank"></a>
Sorry – you misunderstand. I meant a way to change the way WebView
handles opening windows to open them in the user's default browser.
Like I said, I have found a way to do this, but it involves a second
WebView which intercepts the message and passes it to the default
browser with [[NSWorkspace sharedWorkspace] openURL:[request URL]];
As such, it doesn't really matter if there is no other way to do this,
but a better method would be an improvement._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden