[webkit-qt] JavaScript window.onbeforeunload event not appearing

Stan Pensak Stan.Pensak at mathworks.com
Wed Mar 27 08:55:11 PDT 2013


Sorry, to correct what I said about debugging earlier: it is FrameLoader::fireBeforeUnloadEvent() that is being successfully called, but still, nobody is listening to the event (by the time this gets to EventTarget::fireEventListeners() I see there that the listener map is empty.

Stan

From: Stan Pensak
Sent: Wednesday, March 27, 2013 11:48 AM
To: 'webkit-qt at lists.webkit.org'
Subject: JavaScript window.onbeforeunload event not appearing

Hi, working with a build of Qt 4.8.4, our JavaScript developers have complained that their code does not receive unload events (they're using dojo.addOnUnload but I know that this is triggered from window.onbeforeunload), when we destroy a QWebView, or even when we change its URL.  I have debugged a little and it looks like events are being dispatched from FrameLoader::stopLoading(), which itself is called from FrameLoader::closeURL(), but nobody is listening to them to pass them on to JavaScript.

In comparison, the Chrome and Safari browsers on my Windows system do successfully invoke the dojo.addOnUnload callbacks.

Is this a known issue?

Thanks,
Stan Pensak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20130327/29453cea/attachment.html>


More information about the webkit-qt mailing list