summaryrefslogtreecommitdiffstats
path: root/vendor/web-sys/tests/wasm/event.js
blob: 48203ecf88aaf536d543db9026e403e8b801cdea (plain)
1
2
3
4
5
6
7
8
9
10
export function new_event() {
  return new Promise(resolve => {
    window.addEventListener("test-event", resolve);
    window.dispatchEvent(new Event("test-event", {
      bubbles: true,
      cancelable: true,
      composed: true,
    }));
  });
}