Automatically accept any "beforeunload" prompt upon navigation or close window. #1782
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now the spec says that we should automatically dismiss any
beforeunload
prompt upon navigation or window close:But the problem is the definition of
dismissed
:Given that such prompts have both an
OK
andCancel
button, we would have to click onCancel
. But that will cause the page to never get unloaded for a navigation, and thewait for navigation to complete
steps to hang until the page timeout because.I'll check for proper tests when implementing this type of prompt for Marionette in Firefox on https://bugzilla.mozilla.org/show_bug.cgi?id=1693857.
Preview | Diff