Version: (using KDE KDE 3.4.2) Installed from: Gentoo Packages OS: Linux It would be very nice if konqueror/khtml/kjs supported messages (alerts) triggered by window.onbeforeunload events. This feature, though non-standard, exists in IE and Firefox and is very useful for alerting users to unsaved form entries. A sample usage is below: <html> <head> <script type="text/javascript"> function foo(event) { if (!event) event = window.event; return 'some message'; } window.onbeforeunload = foo; </script> </head> <body> <a href="http://kde.org">kde.org</a> </body> </html> In FF and IE this automatically pops up a confirmation dialog whenever the user attempts to navigate away from the page. In konqueror nothing happens. :( Thanks for a great browser.
It would be nice if Konqueror supports this feature. Related documentation/discussion: http://msdn2.microsoft.com/en-us/library/ms536907.aspx http://bugzilla.mozilla.org/show_bug.cgi?id=68215 Demo: http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm
Is implemented in Safari, could be ported. I've seen functionality equivalent to what this event accieves in some sites. What is the work-around?
It is supported by IE, Firefox, Safarie, Chrome... but not in KDE 4.4 khtml. i use it to switch session cookie in to different tabs before unload.
Dear user, KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6. Please migrate to use a QWebEngine based HTML component. We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes. For security issues, please see: https://kde.org/info/security/ Sorry that we did not fix this issue during the life-time of KHTML. Greetings Christoph Cullmann