title: Cordova: testing alert plugin in browser?
body: <p>I'm trying to install and test the <a href="https://github.com/apache/cordova-plugin-dialogs" rel="nofollow">Cordova alert plugin</a> in the browser.</p>
  
  <p>I have created a demo project and added an Android platform to this project too.</p>
  
  <p>Now, according to the instructions given on the plugin's page, we can test it in browser?</p>
  
  <pre><code>Firefox OS Quirks:
  
  Both native-blocking window.alert() and non-blocking navigator.notification.alert() are available.
  </code></pre>
  
  <p>so I tried something like this:</p>
  
  <pre><code>        &lt;script type="text/javascript" src="cordova.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/index.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
          function alertDismissed() {
      // do something
  }
  
  window.alert = navigator.notification.alert(
      'You are the winner!',  // message
      alertDismissed,         // callback
      'Game Over',            // title
      'Done'                  // buttonName
  );
  &lt;/script&gt;
  </code></pre>
  
  <p>but when I open the HTML file in firefox, I get no alerts in the browser at all!
  Is there something that I'm missing?</p>
  
  <p>EDIT:</p>
  
  <p>I noticed when I remove the document ready function I get the following error: <code>TypeError: navigator.notification is undefined</code></p>
  
  <p>Second Edit:</p>
  
  <p>Now I've changed my code to the following and I get no errors but I don't get any Alerts in the browser either:</p>
  
  <pre><code>document.addEventListener('deviceready', function () {
    if (navigator.notification) { // Override default HTML alert with native dialog
        window.alert = function (message) {
            navigator.notification.alert(
                message,    // message
                null,       // callback
                "My Title", // title
                'OK'        // buttonName
            );
        };
    }
  }, false);
  </code></pre>