XUL Parts People sometimes get confused about the syntax for describing the parts of a widget. In object-oriented parlance, the element is analogous to the object itself while the attribute is like a property. Note that the menu element includes both the opening tag at the top and the closing tag at the bottom of the example. In a way, the menu element comprises the menu element itself and its children, the popup and menu items. Events Events are also a source of confusion for many less-hardened developers.
Events are messages that are sent from an object when that object performs some action.
If you don't do anything about these events, then you probably never know about them. Documents will load, buttons will be clicked, and links will be hovered over, and events will be raised for all these actions behind closed doors. If, however, you write event handlers inside event listeners , as we will describe shortly, you can use these events to set off other actions. This using of events to prompt other, more expicit actions is loosely what is meant by an event model. If no one at a particular level in the hierarchy is interested in the event, then the event bubbles up to the next highest level on out to the top of the hierarchy.