Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14559 closed bug (notabug)

bug

Reported by: lhaxw@… 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

Change History (4)

comment:1 Changed 6 years ago by axl.jq

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.

comment:2 Changed 6 years ago by m_gol

Resolution: notabug
Status: newclosed

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

comment:3 Changed 6 years ago by m_gol

#14557 is a duplicate of this ticket.

comment:4 Changed 6 years ago by m_gol

#14558 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.