• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WebView PolicyDelegate issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WebView PolicyDelegate issue


  • Subject: WebView PolicyDelegate issue
  • From: Alex Mills <email@hidden>
  • Date: Sun, 10 May 2009 12:55:33 +0800

Hey All,

I have a WebView that has editing mode turned on and I export and insert html using setInnerHTML etc.

To prevent links from sending the webview to the links address I implemented the decidePolicyForNavigation..... delegate method. The code in this method opens the linked url in the default web browser which works great.

But if I insert an iFrame via [docElement setInnerHTML:[htmlView string]]; it will automatically open the map address in the default browser and wont display the map properly in my WebView. It shouldn't open this iFrame in the browser because it's not a link and it was not clicked.

Even if I remove all code from within the delegate method, the iFrame will not display properly within the webview. Take the method out altogether and it works as it should.

Is there a way to separate a clicked link from inserted HTML?

Cheers
Alex Mills
_______________________________________________

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


  • Prev by Date: Re: Hex to NSString or NSData
  • Next by Date: Re: NSApplication and command line args
  • Previous by thread: Re: How to solve the "command developer usr bin gcc-4.0 failed with exit code 1" mistake?
  • Next by thread: NSTask temrinationStatus always == 1?
  • Index(es):
    • Date
    • Thread