mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-28 12:32:37 +03:00
11 lines
251 B
JavaScript
11 lines
251 B
JavaScript
|
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,
|
||
|
}));
|
||
|
});
|
||
|
}
|