fix: add error listeners + WASM test page
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user