diff options
Diffstat (limited to 'files/fr/web/api/windowtimers')
-rw-r--r-- | files/fr/web/api/windowtimers/clearinterval/index.html | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/files/fr/web/api/windowtimers/clearinterval/index.html b/files/fr/web/api/windowtimers/clearinterval/index.html deleted file mode 100644 index 8041342b1d..0000000000 --- a/files/fr/web/api/windowtimers/clearinterval/index.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: WindowOrWorkerGlobalScope.clearInterval() -slug: Web/API/WindowTimers/clearInterval -tags: - - API - - Méthode - - Reference - - WindowOrWorkerGlobalScope - - clearInterval -translation_of: Web/API/WindowOrWorkerGlobalScope/clearInterval ---- -<div>{{APIRef("HTML DOM")}}</div> - -<p>La méthode <strong><code>clearInterval()</code></strong>, rattachée au <em>mixin </em>{{domxref("WindowOrWorkerGlobalScope")}}, permet d'annuler une action répétée minutée initiée via un appel à {{domxref("WindowOrWorkerGlobalScope.setInterval", "setInterval()")}}.</p> - -<h2 id="Syntax" name="Syntax">Syntaxe</h2> - -<pre class="syntaxbox"><em>scope</em>.clearInterval(<var>intervalID</var>) -</pre> - -<h3 id="Paramètres">Paramètres</h3> - -<dl> - <dt><code>intervalID</code></dt> - <dd>L'identifiant de l'intervalle de répétition qu'on souhaite annuler. Cet identifiant est renvoyé lorsqu'on appelle <code>setInterval()</code> pour définir l'intervalle de répétition.</dd> -</dl> - -<p>On notera que l'ensemble des identifiants utilisés est commun entre ceux fournis par {{domxref("WindowOrWorkerGlobalScope.setInterval", "setInterval()")}} et ceux fournis par {{domxref("WindowOrWorkerGlobalScope.setTimeout", "setTimeout()")}}. Cela signifie qu'on peut, techniquement, utiliser <code>clearInterval()</code> et {{domxref("WindowOrWorkerGlobalScope.clearTimeout", "clearTimeout()")}} de façon interchangeable. C'est toutefois une mauvaise pratique, qui nuit à la lisibilité du code et à sa maintenabilité.</p> - -<h3 id="Valeur_de_retour">Valeur de retour</h3> - -<p>{{jsxref("undefined")}}</p> - -<h2 id="Example" name="Example">Exemples</h2> - -<p>Voir <a href="/fr/docs/Web/API/WindowTimers/setInterval#Exemples" title="DOM/window.setInterval#Example">l'exemple <code>setInterval()</code></a>.</p> - -<h2 id="Specification" name="Specification">Spécifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Spécification</th> - <th scope="col">État</th> - <th scope="col">Commentaires</th> - </tr> - <tr> - <td>{{SpecName('HTML WHATWG', 'webappapis.html#dom-clearinterval', 'WindowOrWorkerGlobalScope.clearInterval()')}}</td> - <td>{{Spec2("HTML WHATWG")}}</td> - <td>Cette méthode a été déplacée sur le <em>mixin</em> <code>WindowOrWorkerGlobalScope</code>.</td> - </tr> - <tr> - <td>{{SpecName('HTML WHATWG', 'webappapis.html#dom-clearinterval', 'clearInterval()')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> - -<div class="hidden">Le tableau de compatibilité de cette page a été généré à partir de données structurées. Si vous souhaitez contribuer à ces données, n'hésitez pas à consulter <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> et à nous envoyer une <em>pull request</em>.</div> - -<p>{{Compat("api.WindowOrWorkerGlobalScope.clearInterval")}}</p> - -<h2 id="Voir_aussi">Voir aussi</h2> - -<ul> - <li>{{domxref("WindowOrWorkerGlobalScope.setTimeout")}}</li> - <li>{{domxref("WindowOrWorkerGlobalScope.setInterval")}}</li> - <li>{{domxref("WindowOrWorkerGlobalScope.clearTimeout")}}</li> - <li>{{domxref("Window.requestAnimationFrame")}}</li> -</ul> |