diff options
| author | julieng <julien.gattelier@gmail.com> | 2021-10-02 17:20:24 +0200 |
|---|---|---|
| committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-10-02 17:30:20 +0200 |
| commit | 1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde (patch) | |
| tree | 30a56efd3eff3a01bd1611e1840fdbbfacf544a4 /files/fr/web/api/document/querycommandsupported | |
| parent | c05efa8d7ae464235cf83d7c0956e42dc6974103 (diff) | |
| download | translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.gz translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.bz2 translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.zip | |
convert content to md
Diffstat (limited to 'files/fr/web/api/document/querycommandsupported')
| -rw-r--r-- | files/fr/web/api/document/querycommandsupported/index.md | 75 |
1 files changed, 30 insertions, 45 deletions
diff --git a/files/fr/web/api/document/querycommandsupported/index.md b/files/fr/web/api/document/querycommandsupported/index.md index ddd356a31b..9e31a74d0f 100644 --- a/files/fr/web/api/document/querycommandsupported/index.md +++ b/files/fr/web/api/document/querycommandsupported/index.md @@ -10,63 +10,48 @@ tags: - editeur translation_of: Web/API/Document/queryCommandSupported --- -<div>{{ApiRef("DOM")}}</div> +{{ApiRef("DOM")}} -<p>La méthode <code><strong>Document.queryCommandSupported()</strong></code> indique si la commande d'éditeur spécifiée est prise en charge par le navigateur.</p> +La méthode **`Document.queryCommandSupported()`** indique si la commande d'éditeur spécifiée est prise en charge par le navigateur. -<h2 id="Syntaxe">Syntaxe</h2> +## Syntaxe -<pre class="syntaxbox"><var>isSupported</var> = document.queryCommandSupported(<var>command</var>); -</pre> + isSupported = document.queryCommandSupported(command); -<h3 id="Paramètres">Paramètres</h3> +### Paramètres -<dl> - <dt><code>command</code></dt> - <dd>La commande pour laquelle on veut déterminer si elle est prise en charge.</dd> -</dl> +- `command` + - : La commande pour laquelle on veut déterminer si elle est prise en charge. -<h3 id="Valeur_de_retour">Valeur de retour</h3> +### Valeur de retour -<p>Renvoie un {{jsxref("Boolean")}} qui est <code>true</code> (<em>vrai</em>) si la commande est prise en charge et <code>false</code> (<em>faux</em>) sinon.</p> +Renvoie un {{jsxref("Boolean")}} qui est `true` (_vrai_) si la commande est prise en charge et `false` (_faux_) sinon. -<h2 id="Notes">Notes</h2> +## Notes -<p>La commande <code>'paste'</code> (<em>coller</em>) renvoie <code>false</code> (<em>faux</em>), pas seulement si la fonctionnalité n'est pas disponible, mais également si le script l'appelant a des privilèges insuffisants pour réaliser l'action <a href="#note1">[1]</a>.</p> +La commande `'paste'` (_coller_) renvoie `false` (_faux_), pas seulement si la fonctionnalité n'est pas disponible, mais également si le script l'appelant a des privilèges insuffisants pour réaliser l'action [\[1\]](#note1). -<h2 id="Exemple">Exemple</h2> +## Exemple -<pre class="brush:js">var flg = document.queryCommandSupported("SelectAll"); +```js +var flg = document.queryCommandSupported("SelectAll"); if(flg) { // ...Faire quelque chose } -</pre> - -<h2 id="Spécifications">Spécifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Spécification</th> - <th scope="col">Statut</th> - <th scope="col">Commentaire</th> - </tr> - <tr> - <td>{{SpecName('HTML Editing','#querycommandsupported()','querycommandsupported')}}</td> - <td>{{Spec2('HTML Editing')}}</td> - <td>Définition initiale.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> - -<p>{{Compat("api.Document.queryCommandSupported")}}</p> - -<h2 id="Voir_aussi">Voir aussi</h2> - -<ul> - <li>{{domxref("Document.execCommand()")}}</li> - <li>{{domxref("Document.queryCommandEnabled()")}}</li> -</ul> +``` + +## Spécifications + +| Spécification | Statut | Commentaire | +| -------------------------------------------------------------------------------------------------------- | -------------------------------- | -------------------- | +| {{SpecName('HTML Editing','#querycommandsupported()','querycommandsupported')}} | {{Spec2('HTML Editing')}} | Définition initiale. | + +## Compatibilité des navigateurs + +{{Compat("api.Document.queryCommandSupported")}} + +## Voir aussi + +- {{domxref("Document.execCommand()")}} +- {{domxref("Document.queryCommandEnabled()")}} |
