--- title: Document.queryCommandSupported() slug: Web/API/Document/queryCommandSupported tags: - API - DOM - Document - Method - Reference - editor translation_of: Web/API/Document/queryCommandSupported ---
Document.queryCommandSupported() メソッドは、指定しされたエディターコマンドにブラウザーが対応しているかどうかを報告します。
isSupported = document.queryCommandSupported(command);
command{{jsxref("Boolean")}} で、コマンドがサポートされていれば true、そうでなければ false を返します。
'paste' コマンドは機能が利用できないときだけでなく、呼び出しスクリプトにそのコマンドを実行するための権限が不足しているときにも false を返します。
var flg = document.queryCommandSupported("SelectAll");
if(flg) {
// ...何か行う
}
| 仕様書 | 状態 | 備考 |
|---|---|---|
| execCommand |
{{Compat("api.Document.adoptNode")}}