From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- .../web/api/window/cancelanimationframe/index.html | 77 ---------------------- .../web/api/window/cancelanimationframe/index.md | 77 ++++++++++++++++++++++ 2 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 files/fr/web/api/window/cancelanimationframe/index.html create mode 100644 files/fr/web/api/window/cancelanimationframe/index.md (limited to 'files/fr/web/api/window/cancelanimationframe') diff --git a/files/fr/web/api/window/cancelanimationframe/index.html b/files/fr/web/api/window/cancelanimationframe/index.html deleted file mode 100644 index a0c27fc7eb..0000000000 --- a/files/fr/web/api/window/cancelanimationframe/index.html +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: window.cancelAnimationFrame() -slug: Web/API/Window/cancelAnimationFrame -tags: - - API - - Animation - - DOM - - Experimental - - Méthode - - Reference - - Window -translation_of: Web/API/Window/cancelAnimationFrame ---- -
{{APIRef}}
- -
La méthode window.cancelAnimationFrame() met fin à une animation précédement configurée par un appel à {{domxref("window.requestAnimationFrame()")}}.
- -

Syntaxe

- -
window.cancelAnimationFrame(requestID);
- -

Paramètres

- -
-
requestID
-
L'identifiant retourné par l'appel à {{domxref("window.requestAnimationFrame()")}} qui a généré la fonction de rappel (callback)
-
- -

Exemples

- -
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
-                            window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
-
-var cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;
-
-var start = window.mozAnimationStartTime;  // Seulement supporté par Firefox. Les autre navigateurs peuvent utiliser quelque chose comme Date.now()..
-
-var myReq; // Déclarer la variable globalement avant de lancer l'animation
-
-function step(timestamp) {
-  var progress = timestamp - start;
-  d.style.left = Math.min(progress / 10, 200) + 'px';
-  if (progress < 2000) {
-    // Ne pas oublier de récupérer l'identifiant à chaque appel de la fonction
-    myReq = requestAnimationFrame(step);
-  }
-}
-myReq = requestAnimationFrame(step);
-// L'annulation utilise le dernier identifiant
-cancelAnimationFrame(myReq);
-
- -

Spécifications

- - - - - - - - - - - - -
Spécification
{{spec("https://www.w3.org/TR/html51/webappapis.html#animation-frames", "Timing control for script-based animations: cancelAnimationFrame", "WD")}}
- -

Compatibilité des navigateurs

- -

{{Compat("api.Window.cancelAnimationFrame")}}

- -

Voir aussi

- - diff --git a/files/fr/web/api/window/cancelanimationframe/index.md b/files/fr/web/api/window/cancelanimationframe/index.md new file mode 100644 index 0000000000..a0c27fc7eb --- /dev/null +++ b/files/fr/web/api/window/cancelanimationframe/index.md @@ -0,0 +1,77 @@ +--- +title: window.cancelAnimationFrame() +slug: Web/API/Window/cancelAnimationFrame +tags: + - API + - Animation + - DOM + - Experimental + - Méthode + - Reference + - Window +translation_of: Web/API/Window/cancelAnimationFrame +--- +
{{APIRef}}
+ +
La méthode window.cancelAnimationFrame() met fin à une animation précédement configurée par un appel à {{domxref("window.requestAnimationFrame()")}}.
+ +

Syntaxe

+ +
window.cancelAnimationFrame(requestID);
+ +

Paramètres

+ +
+
requestID
+
L'identifiant retourné par l'appel à {{domxref("window.requestAnimationFrame()")}} qui a généré la fonction de rappel (callback)
+
+ +

Exemples

+ +
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
+                            window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
+
+var cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;
+
+var start = window.mozAnimationStartTime;  // Seulement supporté par Firefox. Les autre navigateurs peuvent utiliser quelque chose comme Date.now()..
+
+var myReq; // Déclarer la variable globalement avant de lancer l'animation
+
+function step(timestamp) {
+  var progress = timestamp - start;
+  d.style.left = Math.min(progress / 10, 200) + 'px';
+  if (progress < 2000) {
+    // Ne pas oublier de récupérer l'identifiant à chaque appel de la fonction
+    myReq = requestAnimationFrame(step);
+  }
+}
+myReq = requestAnimationFrame(step);
+// L'annulation utilise le dernier identifiant
+cancelAnimationFrame(myReq);
+
+ +

Spécifications

+ + + + + + + + + + + + +
Spécification
{{spec("https://www.w3.org/TR/html51/webappapis.html#animation-frames", "Timing control for script-based animations: cancelAnimationFrame", "WD")}}
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.Window.cancelAnimationFrame")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf