DescriptionAdd support for BeforeUnloadEvent
Add support for BeforeUnloadEvent as per the specification:
http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent
BeforeUnloadEvent has a returnValue attribute. Setting returnValue to a non-empty
string in an event handler causes the user agent should ask the user to confirm
that they wish to unload the document. This is equivalent to returning a non-empty
string in the EventHandler:
http://www.whatwg.org/specs/web-apps/current-work/#onbeforeunloadeventhandler
BeforeUnloadEvent and returnValue are already supported by IE and Firefox. Previously,
Blink was passing a base Event type to the beforeunload event handlers instead of
a BeforeUnloadEvent.
Note that this patch also deprecates Event.returnValue. This used to be an IE
extension but this is no longer supported by IE (nor Firefox). The standard
preventDefault() should be used instead (supported in IE >= 9).
BUG=277851
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156916
Patch Set 1 #
Total comments: 9
Patch Set 2 : Fix issues #
Total comments: 1
Patch Set 3 : Rebase on master #Patch Set 4 : Add back Event.returnValue #Patch Set 5 : Rebaseline test #Patch Set 6 : Fix test failures #Messages
Total messages: 19 (0 generated)
|