Broadcaster

A broadcaster is used whn you want multiple elements to share one or more attribute values, or when you want elements to respond to a state change. Any elements that are observing the broadcaster will share the attributes placed on the broadcaster. For instance, if the broadcaster has a label attribute, the observes will use that label. If the label changes, the labels of the observers will update automatically. An onbroadcast event will be sent to the observers when a change is made.

For menuitems or buttons that just want to have their disabled status set when the feature should be disabled, you should use a command element instead.

More information about broadcaster

broadcaster 要素は複数の要素間で一つ以上の属性値を共有させたり、要素を状態の変化に呼応させたいときに利用される。 broadcaster 要素を監視している任意の要素は broadcaster 要素の属性を共有することになる。例えば、broadcaster 要素が label 属性を持てば、監視している要素たちはその label 属性を利用することになる。 label 属性が変更されれば、それらの要素の label 属性も自動的に更新される。変化が生じた時点で onbroadcast イベントがそれらの要素へ配信される。

無効の状態を設定したくなる場合があるメニューアイテムやボタンに対し、その機能を無効化する必要があるときには、これの代わりに command 要素を用いる必要がある。

broadcaster の追加情報


属性:

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

プロパティとメソッド:

XUL Element から継承:

align allowEvents blur boxObject boxObject.element
boxObject.getLookAndFeelMetric boxObject.height boxObject.screenX boxObject.screenY boxObject.width
boxObject.x boxObject.y builder className click
collapsed contextMenu controllers database datasources
dir doCommand flex focus getElementsByAttribute
height hidden id left maxHeight
maxWidth menu minHeight minWidth observes
ordinal orient pack persist ref
resource statusText style tooltip tooltipText
top width

Element から継承:

addEventListener
appendChild
attributes
childNodes
cloneNode
dispatchEvent
firstChild
getAttribute
getAttributeNS
getAttributeNode
getAttributeNodeNS
getElementsByTagName
getElementsByTagNameNS
hasAttribute
hasAttributeNS
hasAttributes
hasChildNodes
insertBefore
isSupported
lastChild
localName
namespaceURI
nextSibling
nodeName
nodeType
nodeValue
normalize
ownerDocument
parentNode
prefix
previousSibling
removeAttribute
removeAttributeNS
removeAttributeNode
removeChild
removeEventListener
replaceChild
setAttribute
setAttributeNS
setAttributeNode
setAttributeNodeNS
tagName

Copyright (C) 1999 - 2004 XulPlanet.com