Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"BeforeUnloadEvent" user message presets #8023

Open
delta-9 opened this issue Jun 20, 2022 · 0 comments
Open

"BeforeUnloadEvent" user message presets #8023

delta-9 opened this issue Jun 20, 2022 · 0 comments
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest

Comments

@delta-9
Copy link

delta-9 commented Jun 20, 2022

https://html.spec.whatwg.org/multipage/browsing-the-web.html#the-beforeunloadevent-interface:beforeunloadevent

BeforeUnloadEvent

I'm sure it's not the right place to file this issue.

A possible middle ground between custom message prohibition and allowing them would be to create a preset of custom message identified by a constant.

Those message would be crafted ahead to match the common use case where that warning is intended for good purposes, each would be made so they could not be used to deceive the user.

In some use cases "Changes may not be saved" or "This page is asking you to confirm that you want to leave — information you’ve entered may not be saved." works, but it would be great if we could give a better reason to the user.

To give an idea:
UNSAVED_CHANGES = "Your changes may not be saved"
PAYMENT_PROCESSING = "Your payment is still processing"
UPLOADS_PROCESSING = "File uploads are still processing and could be lost"
FORM_DATA_PROCESSING = "The information you entered may not be saved"
ETC..

interface BeforeUnloadEvent : [Event](https://dom.spec.whatwg.org/#interface-event) {
  attribute DOMString ['custom value', 'UNSAVED_CHANGES', 'PAYMENT_PROCESSING', 'UPLOADS_PROCESSING', 'FORM_DATA_PROCESSING', '...'];
};

Maybe I'm missing something, also please redirect me to the right place to post this feature request.

@delta-9 delta-9 changed the title "BeforeUnloadEvent" presets "BeforeUnloadEvent" user message presets Jun 20, 2022
@domenic domenic added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest
Development

No branches or pull requests

2 participants