diff options
Diffstat (limited to 'src-ui')
-rw-r--r-- | src-ui/src/main.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts index f964a6d5..f5f3f303 100644 --- a/src-ui/src/main.ts +++ b/src-ui/src/main.ts @@ -9,6 +9,7 @@ document.addEventListener("DOMContentLoaded", async function () { let counterButtonEl = $("counter-button") as HTMLElement; let counterResultEl = $("counter-result") as HTMLElement; let pingEl = $("backend-ping")! as HTMLElement; + let panicButtonEl = $("panic-button") as HTMLElement; // listen backend-ping event (from Tauri Rust App) listen("backend-ping", function (evt: TauriEvent<any>) { @@ -32,4 +33,10 @@ document.addEventListener("DOMContentLoaded", async function () { helloEl.textContent = "Click again"; }, 1000); }) -})
\ No newline at end of file + + // panic button click + panicButtonEl.addEventListener("pointerup", async function () { + await invoke("force_panic"); + alert("Never should have been able to get here!"); + }); +}) |