v145 · Web APIs · Crash Reporting · demo
Session Journal
Walk through a multi-step checkout. At each step, crash keys are set on navigator.crashReporter to record the user's exact position in the flow. The live preview mirrors the keys written in this tab because the real API is intentionally write-only.
Write-only, ephemeral. Crash keys exist only while the tab is open. They are included in a crash report only if the renderer crashes — they are never sent to a server proactively. The preview below is a client-side mirror for demonstration; the real API has no read-back method.
Click each step to advance — watch crash keys update in the preview panel · add your own keys below
Checkout flow (click to advance)
Crash report keys (live preview)
No keys set yet — start the flow
// Pattern: set crash keys at each step of a user flow
// so a crash report always carries the user's last known position.
if ('crashReporter' in navigator) {
// Step 1 — user enters cart
navigator.crashReporter.setKey('flow', 'cart_review');
navigator.crashReporter.setKey('cart_items', String(cart.length));
// Step 2 — user enters address
navigator.crashReporter.setKey('flow', 'shipping_entry');
navigator.crashReporter.setKey('shipping_country', addr.country);
// Step 3 — payment (remove PII before setting sensitive-adjacent keys)
navigator.crashReporter.setKey('flow', 'payment_entry');
navigator.crashReporter.setKey('payment_method', 'card'); // NOT the card number
navigator.crashReporter.setKey('cart_value', ''); // clear it
// Keys are overwritten on re-set, cleared by setting to empty string.
// They are included ONLY in a crash report — never sent proactively.
}