1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/apps/tests/pkg_install_iframe.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,26 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 + <meta charset="utf-8"> 1.8 + <title>Cross Origin Helper</title> 1.9 +</head> 1.10 +<body> 1.11 +<script type="application/javascript"> 1.12 + 1.13 +window.addEventListener("message", function onMessage(event) { 1.14 + window.removeEventListener("message", onMessage, false); 1.15 + 1.16 + var request = navigator.mozApps.installPackage(event.data); 1.17 + 1.18 + request.onerror = function() { 1.19 + parent.postMessage("Error: " + this.error.name, "*"); 1.20 + }; 1.21 + 1.22 + request.onsuccess = function() { 1.23 + parent.postMessage("Application installed", "*"); 1.24 + }; 1.25 +}, false); 1.26 + 1.27 +</script> 1.28 +</body> 1.29 +</html>