調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >utils >aria >setState
utils.aria.setState() 関数
要素の状態またはプロパティを設定します。Closure の goog.a11y.aria からコピー
署名:
export declare function setState(element: Element, stateName: State, value: string | boolean | number | string[]): void;
パラメータ
パラメータ |
型 |
説明 |
要素 |
要素 |
状態を設定する DOM ノード。 |
stateName |
州 |
状態属性を設定しています。接頭辞「aria-」が自動的に追加されます属性が追加の属性でない場合、状態名に値を付加します。 |
値 |
文字列 |boolean |数値 |文字列 [] |
状態属性の値。 |
戻り値:
void
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-10 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-09-10 UTC。"],[[["The `utils.aria.setState()` function is used to set the state or property of a DOM element."],["It automatically adds the prefix 'aria-' to the state name if the attribute is not an extra attribute."],["The function accepts the element, state name, and value as parameters."],["This function is derived from Closure's `goog.a11y.aria`."]]],[]]