fix: add error listeners + WASM test page

This commit is contained in:
Accusys
2026-05-18 11:48:29 +08:00
parent 4f35386bb1
commit e53106f7e2
2 changed files with 37 additions and 0 deletions

View File

@@ -31,6 +31,14 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
</style>
</head>
<body>
<script>
window.addEventListener('error', function(e) {
document.getElementById('content').innerHTML = '<p style="color:red">Global error: ' + e.message + '</p>';
});
window.addEventListener('unhandledrejection', function(e) {
document.getElementById('content').innerHTML = '<p style="color:red">Unhandled: ' + e.reason + '</p>';
});
</script>
<script src="/doc-wasm/pkg/md_wasm.js"></script>
<div id="app">
<div class="sidebar">