UIWebView respond to Javascript calls
问题 How can I intercept Javascript calls such as window.open as Mobile Safari does? I haven't seen anything listed about this, but it must be possible somehow? Has anyone done this before? 回答1: When the page is finished loaded (webViewDidFinishLoad:), inject a window.open override. Of course it will not work for window.open which are called during page load. Then use a custom scheme to callback your objective C code. [EDIT] OK I have tested it. Now it works. Create a new "view based" project and