gecko-dev/dom/manifest/test/file_reg_appinstalled_event...

16 строки
439 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>