aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/api/windoweventhandlers
diff options
context:
space:
mode:
authorFlorian Dieminger <me@fiji-flo.de>2021-02-11 18:20:58 +0100
committerGitHub <noreply@github.com>2021-02-11 18:20:58 +0100
commit2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb (patch)
tree5e640d40fd69dc380b04e01de981a345e0141ffa /files/es/web/api/windoweventhandlers
parent6aa6274d2ad3e22e7f5e69b1d7531a5eaeaf5666 (diff)
parent8a5554c6fae83e92b10c8dbe5b82108cb44fad6c (diff)
downloadtranslated-content-2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb.tar.gz
translated-content-2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb.tar.bz2
translated-content-2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb.zip
Merge pull request #53 from fiji-flo/unslugging-es
Unslugging es
Diffstat (limited to 'files/es/web/api/windoweventhandlers')
-rw-r--r--files/es/web/api/windoweventhandlers/onunload/index.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/files/es/web/api/windoweventhandlers/onunload/index.html b/files/es/web/api/windoweventhandlers/onunload/index.html
new file mode 100644
index 0000000000..111f87edf2
--- /dev/null
+++ b/files/es/web/api/windoweventhandlers/onunload/index.html
@@ -0,0 +1,46 @@
+---
+title: window.onunload
+slug: Web/API/WindowEventHandlers/onunload
+translation_of: Web/API/WindowEventHandlers/onunload
+original_slug: Web/API/GlobalEventHandlers/onunload
+---
+<p>{{ ApiRef() }}</p>
+<h3 id="Summary" name="Summary">Test Summary</h3>
+<p>The unload event is raised when the document is unloaded.</p>
+<h3 id="Syntax" name="Syntax">Syntax</h3>
+<pre class="eval">window.onunload = <em>funcRef</em>;
+</pre>
+<ul>
+ <li><code>funcRef</code> is a reference to a function.</li>
+</ul>
+<h3 id="Example" name="Example">Example</h3>
+<pre>&lt;html&gt;
+&lt;head&gt;
+
+&lt;title&gt;onunload test&lt;/title&gt;
+
+&lt;script type="text/javascript"&gt;
+
+window.onunload = unloadPage;
+
+function unloadPage()
+{
+ alert("unload event detected!");
+}
+&lt;/script&gt;
+&lt;/head&gt;
+
+&lt;body&gt;
+&lt;p&gt;Reload a new page into the browser&lt;br /&gt;
+ to fire the unload event for this page.&lt;/p&gt;
+&lt;p&gt;You can also use the back or forward buttons&lt;br /&gt;
+ to load a new page and fire this event.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+<h3 id="Notes" name="Notes">Notes</h3>
+<p>Note that using this event handler in your page prevents Firefox 1.5 from caching the page in the in-memory bfcache. See <a href="/En/Using_Firefox_1.5_caching" title="En/Using_Firefox_1.5_caching">Using Firefox 1.5 caching</a> for details.</p>
+<p>Browsers equipped with pop-up window blockers will ignore all window.open() method calls in onunload event handler functions.</p>
+<h3 id="Specification" name="Specification">Specification</h3>
+<p>{{ DOM0() }}</p>
+<p>{{ languages( {"zh-cn": "zh-cn/DOM/window.onunload" } ) }}</p>