On Sun, Jun 26, 2011 at 11:48 PM, Sreeram Ramachandran <sree...@chromium.org > wrote: > > I think the performance benefit and reduction in code complexity are > secondary. Reducing user annoyance is the number one priority. >
But websites can annoy users by many other means. It seems like all we need is a "do not show again" checkbox rather than disallowing them indiscriminately. > I'd prefer to keep things consistent and just disallow all modal dialogs > in all types of unload handlers (beforeunload, pagehide and unload). > Why is that good or necessary? beforeunload and unload have very different semantics. beforeunload is fired before a page is unloaded to make the navigation cancelable and prepare for unloading the page whereas unload is fired AFTER the page dismissal has started. At this point, the navigation cannot be stopped and all script can do is to save states, etc... Given these semantics, it seems okay to disallow modal dialogs in unload event because the navigation cannot be canceled after unload event is fired and, in fact, browser has already started unloading the page. On the other hand, disallowing modal dialogs in beforeunload event seems weird to me because the navigation can still be canceled and the browser hasn't (and shouldn't have) started evicting the page. - Ryosuke
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev