5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-07 06:19:57 +08:00
wails/v3/examples/panic-handling/assets/index.html
2025-01-16 22:08:18 +11:00

27 lines
615 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Window Call Demo</title>
<style>
body {
color: white;
}
</style>
<script src="/wails/runtime.js" type="module"></script>
<script>
async function callBinding(name, ...params) {
return wails.Call.ByName(name, ...params)
}
</script>
</head>
<body>
<button onclick="panic()">Create a panic</button>
<script>
async function panic() {
await callBinding('main.WindowService.GeneratePanic')
}
</script>
</body>
</html>