Short question: Is it possible to detect window.open()
in a UIWebView
using the UIWebViewDelegate
or is there another way to reach this? I need the the url when a window.open()
-Event is fired to show a UIAlertView
.
You need to overwrite window.open()
using JavaScript:
[webView stringByEvaluatingJavaScriptFromString:@"window.open = function (open) { return function (url, name, features) { window.location.href = url; return window; }; } (window.open);"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With