Commandset
This element is not displayed and serves as a container for command elements.
In addition, this element can serve as a command updater, which is used to update the enabled state of one or more commands when certain events occur. A common use of the command updater is to update the cut, copy, and paste menu items as the user selects text.
More information about commandset
この要素は command 要素のコンテナ要素であり、表示されない。
さらにこの要素は、あるイベントが発生したときに 1 つ以上のコマンドの有効状態を更新するのに使用される、コマンドアップデータとして役立ちうる。コマンドアップデータの一般的使用は、ユーザがテキストを選択するのに応じて「切り取り (cut)」「コピー (copy)」「貼り付け (paste)」メニュー項目を更新することである。
属性:
XUL Element から継承:
align
allowevents
allownegativeassertions
class
coalesceduplicatearcs
collapsed
container
containment
context
contextmenu
datasources
debug
dir
empty
equalsize
flags
flex
height
hidden
id
insertafter
insertbefore
left
maxheight
maxwidth
menu
minheight
minwidth
mousethrough
observes
ordinal
orient
pack
persist
popup
position
ref
removeelement
sortDirection
sortResource
sortResource2
statustext
style
template
tooltip
tooltiptext
top
uri
wait-cursor
width
commandupdater
Type: boolean
If true, the commandset is used for updating commands. Typically, this is used to update menu commands such as Undo and Cut based on when an event occurs. For example, since the Cut command is only valid when something is selected, a command updater might be used when the select event occurs.
型 : boolean
true のとき、commandset がコマンドを更新するために用いられる。一般的にはこれは、イベントが発生したときに基づいた、「元に戻す (アンドゥ、Undo)」や「切り取り (Cut)」のようなメニューコマンドを更新するために用いられる。例えば Cut コマンドは、何かが選択されたときにのみ妥当であるため、コマンドアップデータは、選択イベントが発生したときに使用される。
events
Type: comma separated list
A comma separated list of event names that the command updater will update upon. If this attribute is not specified, or you set it to the value '*', all events are valid. Valid events are listed below, or you can use your own events. You can send a custom event by calling the UpdateCommands method of the command dispatcher.
- focus: Occurs when the focused element changes.
- select: Occurs when the selected text changed.
- clipboard: Occurs when the clipboard is changed.
- undo: Occurs when the undo buffer is changed.
型 : カンマで区切ったリスト
コマンドアップデータが更新する、イベント名のカンマで区切ったリスト。この属性を指定しない、または '*' という値に設定したときは、全てのイベントが妥当となる。妥当なイベントを以下にリストするが、自分のイベントを使うこともできる。コマンドディスパッチャー (command dispatcher) の UpdateCommands メソッドをコールすれば、カスタムイベントを送信することができる。
- focus: フォーカスを持つ要素が変わったとき発生。
- select: 選択したテキストが変更されたとき発生。
- clipboard: クリップボードが変更されたとき発生。
- undo: アンドゥバッファが変更されたとき発生。
oncommandupdate
Type: script code
This event occurs when a command update occurs. You would use this to update the disabled status of items.
型 : script code
コマンドアップデートが起きたとき、このイベントが発生する。アイテムの無効状態を更新するのに、これを使うことができる。
targets
Type: comma separated list of element ids
A comma separated list of element ids that the command updater will update upon. If this attribute is not specified, or you set it to the value '*', all elements are valid. The command update will only occur when the event occurs to one of the specified elements.
型 : カンマで区切った要素 id のリスト
コマンドアップデータが更新する要素 id を、カンマで区切ったリスト。この属性を指定しない、または '*' という値に設定したときは、全てのイベントが妥当となる。コマンドの更新は、指定した要素のうちの一つにイベントが発生したときにのみ、起きる。
プロパティとメソッド:
XUL Element から継承:
Element から継承: