<html>
  <body>
    <p>Packaged app installation page</p>
    <script>
      // This URL must be a full url.
      var manifestUrl = 'http://tanx.github.com/html5-mail/manifest.webapp';
      var req = navigator.mozApps.install(manifestUrl);
      req.onsuccess = function() {
        alert('Success: ' + this.result.origin);
      };
      req.onerror = function() {
        alert('Error: ' + this.error.name);
      };
    </script>
  </body>
</html>