#[no_mangle]
pub extern "C" fn trigger_panic() {
panic!("You triggered the panic!");
}
fn main() {
web_panic_report::set_default_hook_with("test-container", |panic_info| {
web_sys::window()
.unwrap()
.alert_with_message(&format!(
"This is a custom callback!\n\n{}",
panic_info.display
))
.unwrap();
});
}