aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/deviceorientationevent/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/api/deviceorientationevent/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/web/api/deviceorientationevent/index.html')
-rw-r--r--files/fr/web/api/deviceorientationevent/index.html120
1 files changed, 120 insertions, 0 deletions
diff --git a/files/fr/web/api/deviceorientationevent/index.html b/files/fr/web/api/deviceorientationevent/index.html
new file mode 100644
index 0000000000..0dfe1510fa
--- /dev/null
+++ b/files/fr/web/api/deviceorientationevent/index.html
@@ -0,0 +1,120 @@
+---
+title: DeviceOrientationEvent
+slug: Web/API/DeviceOrientationEvent
+tags:
+ - B2G
+ - Device Orientation
+ - Experimental
+ - Firefox OS
+ - Mobile
+ - Orientation
+ - WebAPI
+ - events
+ - évènements
+translation_of: Web/API/DeviceOrientationEvent
+---
+<p>{{ApiRef}}{{SeeCompatTable}}</p>
+<h2 id="Sommaire">Sommaire</h2>
+<p>L'évènement <code>DeviceOrientationEvent</code> met à la disposition du développeur des informations sur l'orientation de l'appareil visitant une page Web</p>
+<div class="warning">
+ <p><strong>Attention :</strong> à l'heure actuelle, Firefox et Chrome ne gèrent pas les cordonnées de la même façon. Tenez-en compte lors de l'utilisation de cette API.</p>
+</div>
+<h2 id="Propriétés">Propriétés</h2>
+<dl>
+ <dt>
+ {{domxref("DeviceOrientationEvent.absolute")}} {{readonlyinline}}</dt>
+ <dd>
+ Un booléen, indiquant si l'appareil partage les informations sur son orientation absolue.</dd>
+ <dt>
+ {{domxref("DeviceOrientationEvent.alpha")}} {{readonlyinline}}</dt>
+ <dd>
+ Un nombre, représentant le mouvement de l'appareil sur l'axe « z » exprimé en degrés sur une échelle de 0° à 360°.</dd>
+ <dt>
+ {{domxref("DeviceOrientationEvent.beta")}} {{readonlyinline}}</dt>
+ <dd>
+ Un Nombre représentant le déplacement de l'appareil sur l'axe « x », exprimé en degrés sur une échelle de -180° à 180°.</dd>
+ <dt>
+ {{domxref("DeviceOrientationEvent.gamma")}} {{readonlyinline}}</dt>
+ <dd>
+ Un nombre représentant le déplacement de l'appareil sur l'axe « y », exprimé en degrés sur une échelle de -90° à 90°.</dd>
+</dl>
+<h2 id="Exemple">Exemple</h2>
+<pre class="brush: js">window.addEventListener('deviceorientation', function(event) {
+  console.log("z : " + event.alpha + "\n x : " + event.beta + "\n y : " + event.gamma);
+});</pre>
+<h2 id="Spécifications">Spécifications</h2>
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">État</th>
+ <th scope="col">Commentaires</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('Device Orientation')}}</td>
+ <td>{{Spec2('Device Orientation')}}</td>
+ <td>Spécification initiale.</td>
+ </tr>
+ </tbody>
+</table>
+<h2 id="Compatibilité_entre_les_navigateurs">Compatibilité entre les navigateurs</h2>
+<p>Compatibilité pour DeviceOrientationEvent:</p>
+<p>{{ CompatibilityTable() }}</p>
+<div id="compat-desktop">
+ <table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Technologie</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Support de base</td>
+ <td>7.0</td>
+ <td>3.6 (mozOrientation),<br>
+ 6</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<div id="compat-mobile">
+ <table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Technologie</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Support de base</td>
+ <td>3.0</td>
+ <td>3.6 (mozOrientation),<br>
+ 6</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>4.2</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<h3 id="Notes_spécifiques_à_Gecko">Notes spécifiques à Gecko</h3>
+<p>Firefox 3.6, 4, et 5 supportent <a href="/en-US/DOM/MozOrientation" title="MozOrientation">mozOrientation </a>au lieu de l'interface  standard <code>DeviceOrientationEvent.</code></p>
+<h2 id="Voir_aussi">Voir aussi</h2>
+<ul>
+ <li>{{ event("deviceorientation") }}</li>
+ <li>{{ domxref("DeviceMotionEvent") }}</li>
+ <li>{{ event("devicemotion") }}</li>
+ <li><a href="/en-US/docs/WebAPI/Detecting_device_orientation" title="/en-US/docs/WebAPI/Detecting_device_orientation">Detecting device orientation</a></li>
+ <li><a href="https://developer.mozilla.org/en/DOM/Orientation_and_motion_data_explained" title="Orientation and motion data explained">Orientation and motion data explained</a></li>
+</ul>