Function web_panic_report::set_default_hook_with

source ·
pub fn set_default_hook_with<F>(
    container_id: impl Into<String>,
    submit_callback: F,
)
where F: Fn(&WasmPanicInfo) + Send + Sync + 'static,
Expand description

Set the panic hook, with a default form.

§Params

container_id: The ID of the HTML element that will be unmounted in favor of the form.
submit_callback: The closure that will run when the user hits the send report button.

§Panics

This will panic (ironically) if the panic occurs in a headless environment.