gecko-dev/dom/manifest/test/file_reg_appinstalled_event.html
2018-12-18 20:38:43 +00:00

16 lines
440 B
HTML

<meta charset=utf-8>
<script>
"use strict";
window.addEventListener("appinstalled", () => {
document
.querySelector("#output")
.innerHTML = "event received!";
// Send a custom event back to the browser
// to acknowledge that we got this
const detail = { result: true };
const ev = new CustomEvent("dom.manifest.onappinstalled", { detail });
document.dispatchEvent(ev);
});
</script>
<h1 id=output>waiting for event</h1>