Properly cancel event when beforeunload handler returns null#15142
Closed
nox wants to merge 2 commits intoservo:masterfrom
Closed
Properly cancel event when beforeunload handler returns null#15142nox wants to merge 2 commits intoservo:masterfrom
nox wants to merge 2 commits intoservo:masterfrom
Conversation
Ms2ger
reviewed
Jan 23, 2017
| } | ||
| None => { | ||
| event.upcast::<Event>().PreventDefault(); | ||
| if let Ok(value) = handler.Call_(object, event, exception_handle) { |
Contributor
There was a problem hiding this comment.
Can you add some tests for returnValue? Stick them in event-handler-processing-algorithm.html along with the others.
Contributor
There was a problem hiding this comment.
We should have a test that uses BeforeUnloadEvent rather than Event.
Contributor
Author
|
@bors-servo try |
Contributor
|
⌛ Trying commit 623ba9a with merge 4675448... |
This was referenced Jan 23, 2017
Contributor
Author
|
@bors-servo try |
Contributor
bors-servo
pushed a commit
that referenced
this pull request
Jan 25, 2017
Properly cancel event when beforeunload handler returns null <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15142) <!-- Reviewable:end -->
Contributor
|
💔 Test failed - linux-rel-wpt |
Contributor
Author
|
Seems like #8157 is back? |
Member
|
In a new timeout-based form, sure. We should file a new issue for that. |
Contributor
|
Over to @Ms2ger |
Member
|
We should probably postpone this until whatwg/html#2297 is resolved. |
Contributor
Author
|
The HTML fix landed but the tests now require full unload support to run. We don't support that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change is