A broadcaster is used when 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 observers 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 menuitem
s or button
s that just want to have their disabled
status set when the feature should be disabled, you should use a command
element instead.
More information is available in the Broadcasters and Observers XUL Tutorial.
(example needed)
Inherited from XUL element |
Inherited Properties |