Bug 190090

Summary: The return value of an OnBeforeUnloadEventHandler should always be coerced into a DOMString
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, ggaren, rniwa, sam, webkit-bug-importer, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2018-09-28 14:13:09 PDT
The return value of an OnBeforeUnloadEventHandler should always be coerced into a DOMString: - https://html.spec.whatwg.org/#onbeforeunloadeventhandler - https://html.spec.whatwg.org/#the-event-handler-processing-algorithm In particular, this means that returning false in an OnBeforeUnloadEventHandler should NOT cancel the event when the event is a CustomEvent (and not a BeforeUnloadEvent). This is because the return value cannot be false at: - https://html.spec.whatwg.org/#the-event-handler-processing-algorithm (Step 5. Otherwise case).
Attachments
Patch (10.87 KB, patch)
2018-09-28 14:27 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-09-28 14:27:45 PDT
WebKit Commit Bot
Comment 2 2018-09-28 19:04:00 PDT
Comment on attachment 351110 [details] Patch Clearing flags on attachment: 351110 Committed r236633: <https://trac.webkit.org/changeset/236633>
WebKit Commit Bot
Comment 3 2018-09-28 19:04:01 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.