Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

commandset

この要素は表示されず、command 要素のコンテナを提供します。

さらに、この要素はコマンドアップデータとして働きます。コマンドアップデータは特定のイベントが発生したときに一つ以上の有効なコマンドを更新するために使われます。コマンドアップデータの一般的な使われ方は、ユーザが選択した文字の切り取りとコピー、貼り付けメニューの更新です。

詳しい情報は XUL チュートリアルにあります。

属性
commandupdater, events, oncommandupdate, targets

<commandset>
  <command id="cmd_open" oncommand="alert('Open!');"/>
  <command id="cmd_help" oncommand="alert('Help!');"/>
</commandset>

属性

commandupdater
型: 論理型
true の場合、commandset はコマンドの更新のために使用されます。一般的には、イベントが発生した時の Undo や Cut など、menu コマンドの更新に使用されます。例えば、Cut コマンドは何かが選択された時のみ効果があるため、commandupdater は select イベントが発生した時に使用されます。
events
型: カンマで区切られたリスト
command updater が更新するためのイベント名のカンマで区切られたリスト。この属性が指定されていないか値に '*' を設定した場合、すべてのイベントで効果があります。効果のあるイベントが以下のリストにあります。または独自のイベントを使用することもできます。command dispatcher の UpdateCommands メソッドを呼び出すことによってカスタムイベントを送ることができます。
  • focus: フォーカスされた要素が変更された時に発生します。
  • select: 選択されたテキストが変更された時に発生します。
  • clipboard: クリップボードが変更された時に発生します。
  • undo: アンドゥバッファが変更された時に発生します。
oncommandupdate
型: スクリプトコード
このイベントはコマンドが更新された時、発生します。無効化された項目の状態を更新するために使用します。
targets
型: カンマで区切られた要素の id のリスト
command update が更新する要素の id の、カンマで区切られたリスト。この属性が指定されていないか '*' を設定した場合、すべての要素で効果があります。command update は指定の要素の一つにイベントが発生した時のみ起こります。

プロパティ

XUL 要素からの継承
align, attributes, allowEvents, baseURI, boxObject, builder, childElementCount, childNodes, children, className, clientHeight, clientLeft, clientTop, clientWidth, collapsed, contextMenu, controllers, database, datasources, dir, firstChild, firstElementChild, flex, height, hidden, id, lastChild, lastElementChild, left, localName, maxHeight, maxWidth, menu, minHeight, minWidth, namespaceURI, nextElementSibling, nextSibling, nodeName, nodeType, nodeValue, observes, ordinal, orient, ownerDocument, pack, parentNode, persist, prefix, previousElementSibling, previousSibling, ref, resource, scrollHeight, scrollLeft, scrollTop, scrollWidth, statusText, style, tagName,textContent, tooltip, tooltipText, top, width

メソッド

関連項目

TBD

ドキュメントのタグと貢献者

 このページの貢献者: Marsf, Taken
 最終更新者: Marsf,