aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/window/devicemotion_event
diff options
context:
space:
mode:
authorCarolyn Wu <87150472+cw118@users.noreply.github.com>2022-03-01 13:47:30 -0500
committerGitHub <noreply@github.com>2022-03-01 19:47:30 +0100
commitda412bbfa23b6e02dc33331891c6d4aee2bb7242 (patch)
tree9b12d2d411cefcd211382a3cfe935203731c0b80 /files/fr/web/api/window/devicemotion_event
parent2c46c339b552b185def6254d895d1529d61db4c0 (diff)
downloadtranslated-content-da412bbfa23b6e02dc33331891c6d4aee2bb7242.tar.gz
translated-content-da412bbfa23b6e02dc33331891c6d4aee2bb7242.tar.bz2
translated-content-da412bbfa23b6e02dc33331891c6d4aee2bb7242.zip
Markdown fixes part 1 (fr/web/a*) (#4316)
* Fix MD038, no spaces inside code span elements * Fix MD037, no spaces inside emphasis markers * Fix MD039, no spaces inside link text * Missed link text fix in API file * Various typo fixes
Diffstat (limited to 'files/fr/web/api/window/devicemotion_event')
-rw-r--r--files/fr/web/api/window/devicemotion_event/index.md82
1 files changed, 43 insertions, 39 deletions
diff --git a/files/fr/web/api/window/devicemotion_event/index.md b/files/fr/web/api/window/devicemotion_event/index.md
index ed3fc041cb..be4a8f3443 100644
--- a/files/fr/web/api/window/devicemotion_event/index.md
+++ b/files/fr/web/api/window/devicemotion_event/index.md
@@ -1,54 +1,58 @@
---
-title: devicemotion
+title: 'Window: devicemotion event'
slug: Web/API/Window/devicemotion_event
translation_of: Web/API/Window/devicemotion_event
-original_slug: FUEL/Window/devicemotion_event
+browser-compat: api.Window.devicemotion_event
---
-L'événement devicemotion est déclenché à intervalles réguliers et indique la quantité de force physique d'accélération que le périphérique reçoit à ce moment. Il fournit également des informations sur le taux de rotation, si disponible.
-
-## Informations générales
-
-- Spécification
- - : [DeviceOrientation Event](http://www.w3.org/TR/orientation-event/#devicemotion)
-- Interface
- - : DeviceMotionEvent
-- Propagation
- - : Non
-- Annulable
- - : Non
-- Cible
- - : DefaultView (`window`)
-- Action par défaut
- - : Aucune
-
-## Propriétés
-
-| Property | Type | Description |
-| -------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `target` Lecture seule | [`EventTarget`](/fr/docs/Web/API/EventTarget) | The event target (the topmost target in the DOM tree). |
-| `type` Lecture seule | [`DOMString`](/fr/docs/Web/API/DOMString) | The type of event. |
-| `bubbles` Lecture seule | [`Boolean`](/fr/docs/Web/JavaScript/Reference/Objets_globaux/Boolean) | Whether the event normally bubbles or not |
-| `cancelable` Lecture seule | [`Boolean`](/fr/docs/Web/JavaScript/Reference/Objets_globaux/Boolean) | Whether the event is cancellable or not? |
-| `acceleration` Lecture seule | [`DeviceAcceleration`](/fr/docs/Web/API/DeviceAcceleration) | The acceleration of the device. This value has taken into account the effect of gravity and removed it from the figures. This value may not exist if the hardware doesn't know how to remove gravity from the acceleration data. |
-| `accelerationIncludingGravity `Lecture seule | [`DeviceAcceleration`](/fr/docs/Web/API/DeviceAcceleration) | The acceleration of the device. This value includes the effect of gravity, and may be the only value available on devices that don't have a gyroscope to allow them to properly remove gravity from the data. |
-| `interval` Lecture seule | double | The interval, in milliseconds, at which the DeviceMotionEvent is fired. The next event will be fired in approximately this amount of time. |
-| `rotationRate` Lecture seule | [`DeviceRotationRate`](/fr/docs/Web/API/DeviceRotationRate) | The rates of rotation of the device about all three axes. |
-
-## Exemple
+{{APIRef}}
+
+L'évènement `devicemotion` est déclenché à intervalles réguliers et indique la quantité de force physique d'accélération que le périphérique reçoit à ce moment. Il fournit également des informations sur le taux de rotation, si disponible.
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">Bouillonne</th>
+ <td>Non</td>
+ </tr>
+ <tr>
+ <th scope="row">Annulable</th>
+ <td>Non</td>
+ </tr>
+ <tr>
+ <th scope="row">Interface</th>
+ <td><a href="/fr/docs/Web/API/DeviceMotionEvent"><code>DeviceMotionEvent</code></a></td>
+ </tr>
+ <tr>
+ <th scope="row">Propriété gestionnaire d'évènement</th>
+ <td><a href="/fr/docs/Web/API/Window/ondevicemotion"><code>Window.ondevicemotion</code></a></td>
+ </tr>
+ </tbody>
+</table>
+
+## Exemples
```js
function handleMotionEvent(event) {
-    var x = event.accelerationIncludingGravity.x;
-    var y = event.accelerationIncludingGravity.y;
-    var z = event.accelerationIncludingGravity.z;
+ var x = event.accelerationIncludingGravity.x;
+ var y = event.accelerationIncludingGravity.y;
+ var z = event.accelerationIncludingGravity.z;
-    // Faire quelque chose de génial.
+ // Faire quelque chose de génial.
}
window.addEventListener("devicemotion", handleMotionEvent, true);
```
-## Evénements liés
+## Spécifications
-- [`deviceorientation`](/fr/docs/Mozilla_event_reference/deviceorientation)
+{{Specifications}}
+
+## Compatibilité des navigateurs
+
+{{Compat}}
+
+## Voir aussi
+
+- [`deviceorientation`](/fr/docs/Web/API/Window/deviceorientation_event)
+- [`DeviceOrientation Event` (en anglais)](https://www.w3.org/TR/orientation-event/#devicemotion)