From 1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:24 +0200 Subject: convert content to md --- .../api/document/querycommandsupported/index.md | 75 +++++++++------------- 1 file changed, 30 insertions(+), 45 deletions(-) (limited to 'files/fr/web/api/document/querycommandsupported') 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 --- -
{{ApiRef("DOM")}}
+{{ApiRef("DOM")}} -

La méthode Document.queryCommandSupported() indique si la commande d'éditeur spécifiée est prise en charge par le navigateur.

+La méthode **`Document.queryCommandSupported()`** indique si la commande d'éditeur spécifiée est prise en charge par le navigateur. -

Syntaxe

+## Syntaxe -
isSupported = document.queryCommandSupported(command);
-
+ isSupported = document.queryCommandSupported(command); -

Paramètres

+### Paramètres -
-
command
-
La commande pour laquelle on veut déterminer si elle est prise en charge.
-
+- `command` + - : La commande pour laquelle on veut déterminer si elle est prise en charge. -

Valeur de retour

+### Valeur de retour -

Renvoie un {{jsxref("Boolean")}} qui est true (vrai) si la commande est prise en charge et false (faux) sinon.

+Renvoie un {{jsxref("Boolean")}} qui est `true` (_vrai_) si la commande est prise en charge et `false` (_faux_) sinon. -

Notes

+## Notes -

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].

+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). -

Exemple

+## Exemple -
var flg = document.queryCommandSupported("SelectAll");
+```js
+var flg = document.queryCommandSupported("SelectAll");
 
 if(flg) {
   // ...Faire quelque chose
 }
-
- -

Spécifications

- - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('HTML Editing','#querycommandsupported()','querycommandsupported')}}{{Spec2('HTML Editing')}}Définition initiale.
- -

Compatibilité des navigateurs

- -

{{Compat("api.Document.queryCommandSupported")}}

- -

Voir aussi

- - +``` + +## 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()")}} -- cgit v1.2.3-54-g00ecf