There are multiple questions on SO already addressing similar issues but none answers my exact type of question. Most of the answers involves running a JS snippet and overloading the alert method as such: window.alert = function() {};
The problem I am having is that the webpage loaded (which I have no control over the content) opens an alert before the rendering of the whole page completes.
Because of this I cannot use the: - (void)webViewDidFinishLoad:(UIWebView *)webView
delegate method to run the JS snippet. In addition running the same snippet in - (void)webViewDidStartLoad:(UIWebView *)webView
won't do me any good since it executes before the DOM is loaded.
Similar questions:
- Capture (and prevent) alert() modal in UIWebView
- Can I handle alert inside UIWebViewDelegate?
- UIWebView: Can I disable the javascript alert() inside any web page?
Any pointers on this?
?
– DrogoNevets Feb 05 '14 at 14:58