Skip to content

Undeprecate the unload event#28364

Merged
caugner merged 2 commits intomdn:mainfrom
ddbeck:unload-no-deprecated
Nov 4, 2025
Merged

Undeprecate the unload event#28364
caugner merged 2 commits intomdn:mainfrom
ddbeck:unload-no-deprecated

Conversation

@ddbeck
Copy link
Copy Markdown
Contributor

@ddbeck ddbeck commented Nov 3, 2025

Summary

unload is marked as deprecated, but it doesn't satisfy the guidelines.

Test results and supporting details

Given the evidence here, I think it's much too early to mark this event deprecated.

Related issues

n/a

@github-actions github-actions Bot added data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:xs [PR only] 0-6 LoC changed labels Nov 3, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 3, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@ddbeck ddbeck force-pushed the unload-no-deprecated branch from d419dc4 to 2fa1f09 Compare November 3, 2025 14:01
Comment thread api/Window.json
@caugner caugner enabled auto-merge (squash) November 4, 2025 07:46
@caugner caugner merged commit 8642861 into mdn:main Nov 4, 2025
6 checks passed
@ddbeck ddbeck deleted the unload-no-deprecated branch November 17, 2025 13:30
@Zakariathr22
Copy link
Copy Markdown

Please consider keeping the unload event undeprecated for as long as possible. Many existing applications still rely on it, and maintaining its availability helps avoid unnecessary breakage in real-world use cases.

@ddbeck
Copy link
Copy Markdown
Contributor Author

ddbeck commented Jan 22, 2026

@Zakariathr22 BCD does not decide whether a feature is deprecated (discouraged from use) or slated from removal from browsers. That work happens through the responsible standards body (WHATWG, in this case) or browser vendors, respectively.

@Zakariathr22
Copy link
Copy Markdown

@ddbeck Thanks for replying

My intent was mainly to highlight real-world dependency on the unload event and the impact that deprecation or removal can have on existing applications, so that this feedback can be considered in the appropriate standards or vendor discussions.

Could you please advise on the best channel or forum where this concern should be raised so it can be reviewed by the responsible standards body or browser vendors?

@ddbeck
Copy link
Copy Markdown
Contributor Author

ddbeck commented Jan 22, 2026

@Zakariathr22 I don't think anyone has proposed removal from the platform and breaking pages that use the unload event. Deprecation would only advise developers against using it, to help them consider other options instead (e.g., pagehide). That said, for this specific case, I believe whatwg/html#6026 would be the place to discuss with the spec editors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:xs [PR only] 0-6 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants