helper/install.html
<html>
<body>
<p>Packaged app installation page</p>
<script>
// This URL must be a full url.
var manifestUrl = location.href.substring(0,
location.href.lastIndexOf('/')) + '/manifest.webapp';
var req = navigator.mozApps.installPackage(manifestUrl);
req.onsuccess = function() {
alert(this.result.origin);
};
req.onerror = function() {
alert(this.error.name);
};
</script>
</body>
</html>