aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/api/globaleventhandlers/onresize/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/api/globaleventhandlers/onresize/index.html
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip
initial commit
Diffstat (limited to 'files/de/web/api/globaleventhandlers/onresize/index.html')
-rw-r--r--files/de/web/api/globaleventhandlers/onresize/index.html77
1 files changed, 77 insertions, 0 deletions
diff --git a/files/de/web/api/globaleventhandlers/onresize/index.html b/files/de/web/api/globaleventhandlers/onresize/index.html
new file mode 100644
index 0000000000..b9866678c3
--- /dev/null
+++ b/files/de/web/api/globaleventhandlers/onresize/index.html
@@ -0,0 +1,77 @@
+---
+title: GlobalEventHandlers.onresize
+slug: Web/API/GlobalEventHandlers/onresize
+tags:
+ - API
+ - DOM
+ - Property
+translation_of: Web/API/GlobalEventHandlers/onresize
+---
+<p>{{ ApiRef() }}</p>
+
+<p>Die <strong>GlobalEventHandlers.onresize</strong> Property enthält einen {{domxref("EventHandler")}}, der ausgelöst wird, sobald ein {{event("resize")}}-Event empfangen wird.</p>
+
+<h2 id="Syntax" name="Syntax">Syntax</h2>
+
+<pre class="eval">window.onresize = <em>funcRef</em>;
+</pre>
+
+<h3 id="Parameters" name="Parameters">Parameter</h3>
+
+<ul>
+ <li><code>funcRef</code> ist eine Referenz auf eine Funktion.</li>
+</ul>
+
+<h2 id="Example" name="Example">Beispiel</h2>
+
+<pre>window.onresize = doFunc;
+</pre>
+
+<pre>&lt;html&gt;
+&lt;head&gt;
+
+&lt;title&gt;onresize Test&lt;/title&gt;
+
+&lt;/head&gt;
+
+&lt;body&gt;
+&lt;p&gt;Verändere die Größe des Browser Fensters, um den resize-Event auszulösen.&lt;/p&gt;
+
+&lt;p&gt;Window height: &lt;span id="height"&gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p&gt;Window width: &lt;span id="width"&gt;&lt;/span&gt;&lt;/p&gt;
+
+&lt;script type="text/javascript"&gt;
+  var heightOutput = document.querySelector('#height');
+  var widthOutput = document.querySelector('#width');
+
+  function resize() {
+ heightOutput.textContent = window.innerHeight;
+  widthOutput.textContent = window.innerWidth;
+  }
+
+ window.onresize = resize;
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+
+<h2 id="Notes" name="Notes">Anmerkung</h2>
+
+<p>Das resize-Event wird ausgelöst nachdem die Größe des Fensters verändert wurde.</p>
+
+<h2 id="Specification" name="Specification">Spezifikation</h2>
+
+<table class="spectable standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spezifikation</th>
+ <th scope="col">Status</th>
+ <th scope="col">Kommentar</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG','webappapis.html#handler-onresize','onresize')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>