gecko-dev/dom/manifest/test/file_reg_install_event.html

16 строки
429 B
HTML

<meta charset=utf-8>
<script>
"use strict";
window.addEventListener("install", () => {
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.oninstall", { detail });
document.dispatchEvent(ev);
});
</script>
<h1 id=output>waiting for event</h1>