HTMLButtonElement: commandForElement プロパティ
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
commandForElement
は HTMLButtonElement
インターフェイスのプロパティで、ボタンを通じて制御する要素を取得または設定します。
これは JavaScript における HTML の commandfor
属性の同等物です。
値
このボタンが制御する既存の要素 (Element
) への参照です。
例
js
const popover = document.getElementById("mypopover");
const toggleBtn = document.getElementById("toggleBtn");
toggleBtn.commandForElement = popover;
仕様書
No specification found
No specification data found for api.HTMLButtonElement.commandForElement
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
commandForElement |
Legend
Tip: you can click/tap on a cell for more information.
- No support
- No support
- Experimental. Expect behavior to change in the future.
- User must explicitly enable this feature.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.