spec 2 linked patterns checked

MDN: Window beforeunload event

Documents the beforeunload event for warning users about impending unsaved data loss, including browser restrictions, sticky activation, mobile reliability limits, and the recommendation to attach listeners only while unsaved changes exist.

Read with a purpose

What this source can teach

Use this source to check a technical or accessibility requirement against its exact wording and scope.

  1. Start with the original. Open the source and find the guidance or example relevant to your task.
  2. Trace the connection. Use the claim notes below to see how this site applies the source to specific patterns.
  3. Check the setting. Compare the source's platform, people, and constraints with your own decision.

Pattern Decisions This Source Supports

Pattern Supported decision Required contract Claim note
Exit warning Choose exit warning when departure has already been attempted and leaving would lose work or context that is not safely recoverable. The warning appears only after a departure attempt or immediately before a known session boundary that could cause loss. MDN documents beforeunload for preventing unsaved data loss and recommends conditional use.
Unsaved changes prompt Choose unsaved changes prompt when a user action inside the product would abandon or replace dirty local edits before they are saved. Opening the prompt never clears the dirty values. MDN documents warning users about unsaved data loss and limiting listeners to actual unsaved-change conditions.

Comparisons supported by this source

Evidence Role

This source is treated as spec evidence. Its value comes from the specific claims and setting described above.

Publisher: Mozilla. Last checked: .

Saved items