調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >ComponentManager >addCapability
ComponentManager.addCapability() メソッド
既存の登録済みのコンポーネントに機能を追加します。
署名:
addCapability<T>(id: string, capability: string | Capability<T>): void;
パラメータ
パラメータ |
型 |
説明 |
id |
文字列 |
機能を追加するコンポーネントの ID。 |
capability |
文字列 |機能<T> |
追加する機能。 |
戻り値:
void
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-08-29 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-08-29 UTC。"],[[["The `ComponentManager.addCapability()` method allows adding a new capability to an existing registered component."],["It requires the component's ID and the capability (as a string or `Capability` object) as input."],["This method doesn't return any value and modifies the component directly."]]],["The `addCapability` method of `ComponentManager` adds a capability to an existing component. It takes two parameters: `id`, a string representing the component's ID, and `capability`, which can be either a string or a `Capability\u003cT\u003e` object. This method modifies the component to include the specified capability. The method doesn't return any value.\n"]]