title: Possible for UIWebView to detect when a Javascript dialog is about to be shown?
body: <p>I'm new to iOS development. I come from an Android background.</p>
  
  <p>I'd like to know whether it's possible for a <code>UIWebView</code> to detect when a Javascript alert/confirm/prompt dialog is about to be shown? (Similar to how the <code>shouldStartLoadWithRequest</code> method of <code>UIWebViewDelegate</code> is called before a web view begins loading a frame.)</p>
  
  <p>The Android equivalent of what I'm looking for is <code>WebChromeClient</code>'s <code>onJSAlert(...)</code>, <code>onJsConfirm(...)</code> and <code>onJsPrompt(...)</code> methods, and by means of these methods the application can decide whether to show a given dialog or to block it.</p>