[Webkit-unassigned] [Bug 188696] beforeunload interoperability issues

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 22 01:54:40 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=188696

--- Comment #22 from PhistucK <phistuck at chromium.org> ---
So, yes, a big patch, but mostly because of extensive test cases.
I basically covered everything in https://next.plnkr.co/edit/OpgW2EvPSh0JbkLwXDU6?p=preview&utm_source=legacy&utm_medium=worker&utm_campaign=next&preview
And then some, including within iFrames.
I might have gone a bit overboard with this, however, I think the tests now cover every tiny bit of the specification.
(It is a shame those cannot be web-platform-tests :( due to the user activation requirement)

uncaughtExceptionInEventHandler is used by IndexedDB, for rolling back a transaction. Even though beforeunload is currently unused/not fired by IndexedDB, I added it, for completeness.

In addition to the throwing return issue, I added a new fix for the following case -
addEventListener("beforeunload", () => "string")
Per the DOM standard, the return value of the listener in addEventListener is completely ignored, but only WebKit does not ignore it and only for beforeunload. This looks like an accident rather than an intentional design/feature. Since no other browser supports this questionable feature (even Edge that wants to be compatible with WebKit/Blink) at this point, I fixed it to be ignored, like with the rest of the events.

I had to fix a test as a result of this fix, but the original test case in https://bugs.webkit.org/show_bug.cgi?id=26211 did not use addEventListener and returned a string, it used onbeforeunload and returned a string, so I assume it was just an accident in the test writing (changing to addEventListener and returning a string still worked, so there was nothing to fix/change).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180922/be11cde0/attachment.html>


More information about the webkit-unassigned mailing list