On OSX, I am using XCode to make a desktop app with a webview in it. The webview loads ok, and I can dynamically load content into it – but when I click on links inside the webview, they are not followed. They change color, but no new page is loaded. If I code my links with javascript like this – then they work.
<a href='http://x/' onClick="window.location = this.href">link there</a>
Is there an Objective-C one liner that allows links to be followed inside web-views?
Is there another issue I am not aware of here?
Turns out it was because I had code I copied form the web with some custom function to ignore WebPolicyDecisionListener…
Sorry for asking question without giving all the details – all this objective-c is new to me, I don’t know which bits do what yet. I do some pointing and clicking, and then some coding – I don’t know exactly how that all links up. With other languages, you have the whole program in one place – it takes a bit of a learning curve to get used to… but I digress.
I fixed by adding some comments – see code below…