Is beforeunload fired in all cases?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 9.4k
- Forks
- 3.2k
- PR merge metrics
- PR metrics pending
Description
Based on some initial tests in https://github.com/web-platform-tests/wpt/pull/36488, in Chrome and Safari navigating or traversing to a javascript: URL does not fire beforeunload. Whereas in Firefox it does fire.
In the current spec all navigations and traversals fire beforeunload, whereas in the current state of the rewrite (#6315) only those which require a fetch will do so. So the following are the tricky cases:
- javascript: URLs
- srcdoc resources
- embed/object
- non-fetch scheme documents
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the initial tests in web-platform-tests PR 36488 and the navigation rewrite in issue #6315. Compare beforeunload behavior for javascript: URLs, srcdoc resources, embed/object, and non-fetch scheme documents, then document which cases the specification should require and ensure the rewrite is consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100