onBeforeUnload function ✓ 100.0%
Last updated: 2026-03-05T11:49:57.418Z
Metrics
LOC: 13
Complexity: 3
Params: 0
Coverage: 100.0% (6/6 lines, 0x executed)
Signature
onBeforeUnload(): : void
Source Code
function onBeforeUnload(): void {
if (!session || session.status !== "recording") return;
addStep({
type: "navigate",
timestamp: now(),
url: window.location.href,
label: "Page navigation",
});
// Persist session including the navigate step so it is available after reload
persistSession();
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| addStep | calls |
| now | calls |
| persistSession | calls |
No incoming dependencies.