2013-03-28 16:28:24 -04:00
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<p>Packaged app installation page</p>
|
|
|
|
<script>
|
|
|
|
// This URL must be a full url.
|
2013-03-29 05:14:43 -04:00
|
|
|
var manifestUrl = window.location.href.replace('install.html', 'manifest.webapp');
|
2013-03-28 16:28:24 -04:00
|
|
|
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>
|