title: iOS WKWebView not showing javascript alert() dialog
body: <p>I am having some trouble getting a WKWebView in iOS 8 to display an alert dialog that is called from Javascript. After creating a standard WKWebView and loading an HTML file, I have a button on the page that creates a simple alert with some text. This works in UIWebView and in Google Chrome/Safari, but does not appear to be working in WKWebView. Any help is appreciated.</p>
  
  <p>My setup is as follows:</p>
  
  <pre><code>WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
  config.allowsInlineMediaPlayback = YES;
  config.mediaPlaybackRequiresUserAction = false;
  _wkViewWeb = [[WKWebView alloc] initWithFrame:_viewWeb.frame config];
  _wkViewWeb.scrollView.scrollEnabled = NO;
  NSString *fullURL = @"file://.../TestSlide.html";
  NSURL *url = [NSURL URLWithString:fullURL];
  NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10];
  
  [_wkViewWeb loadRequest:request];
  </code></pre>
  
  <p>The html has the following function:</p>
  
  <pre><code>&lt;SCRIPT Language="JavaScript"&gt;
  function alertTest() {
      alert("Testing Alerts");
  }
  &lt;/SCRIPT&gt;
  </code></pre>
  
  <p>And a button:</p>
  
  <pre><code>&lt;b&gt;Test Alerts: &lt;input type="button" value="Alert Popup" onclick="alertTest()"&gt;&lt;br&gt;&lt;/b&gt; &lt;br&gt;
  </code></pre>
  
  <p>This setup works in UIWebView and in regular browsers, but does not work in WKWebView. Am I missing something in the configuration? Should I be using one of the WK delegates to control the alert/confirm dialog behavior? Thank you.</p>