summaryrefslogtreecommitdiffstats
path: root/dom/manifest/test/file_reg_appinstalled_event.html
blob: 80ff15e11c9282a77219cc38bebdc875e087b64b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<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>