title: Android JsResult onJsAlert when to use confirm and when to use cancel?
body: <p>Ive just been running through the WebViewDemo for andriod whereby allowing the ability to call native code from Javascript and vice-versa.</p>
  
  <pre><code>public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
          Log.d(LOG_TAG, message);
          result.confirm();
          return true;
      }
  </code></pre>
  
  <p>With regards to <code>result.confirm()</code>, why or when would you call <code>confirm</code> or <code>cancel</code>?</p>