Skip to content

Unload: update outdated example #639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions entries/unload.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<p>Any <code>unload</code> event handler should be bound to the <code>window</code> object:</p>
<pre><code>
$( window ).unload(function() {
alert( "Handler for .unload() called." );
return "Handler for .unload() called.";
});
</code></pre>
<p>After this code executes, the alert will be displayed whenever the browser leaves the current page.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/alert/message/ maybe?

s/will be/may be/ as well?

Expand All @@ -39,7 +39,7 @@ It is not possible to cancel the <code>unload</code> event with <code>.preventDe
<desc>To display an alert when a page is unloaded:</desc>
<code><![CDATA[
$( window ).unload(function() {
alert( "Bye now!" );
return "Bye now!";
});
]]></code>
</example>
Expand Down