Side navigation
#14559 closed bug (notabug)
Opened November 20, 2013 08:46AM UTC
Closed November 28, 2013 08:23AM UTC
Last modified November 28, 2013 08:24AM UTC
bug
Reported by: | lhaxw@126.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
the function
$( window ).unload(function() {
alert( "Bye now!" );
});
can not work on Chrom
Attachments (0)
Change History (4)
Changed November 22, 2013 03:23PM UTC by comment:1
Changed November 28, 2013 08:23AM UTC by comment:2
resolution: | → notabug |
---|---|
status: | new → closed |
Thanks for the report! As axl.jq said, it's a documentation issue, not the jQuery one. I reported it there: https://github.com/jquery/api.jquery.com/issues/388
The event isn't intended to do such things, it's only to show a *confirmation message*. Chrome is blocking old behavior to run specific code onunload. As it should always be.
Use it this way:
http://stackoverflow.com/a/3464537/1670956
jQuery guys, you should remove outdated examples at http://api.jquery.com/unload/ since I suppose all browsers will follow the Chrome behavior.