Your Search Results

    commandset

    This element is not displayed and serves as a container for command elements.

    In addition, this element can hold a command updater which is used to update commands when certain events occur. A common use of the command updater is to update cut, copy, and paste menu items.

    More information is available in the XUL tutorial.

    Attributes
    commandupdater, events, oncommandupdate, targets

    Example

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

    Attributes

    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.
    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.
    oncommandupdate
    Type: script code
    This event occurs when a command update occurs. You would use this to update the disabled status of items.
    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.

    Properties

    Inherited Properties
    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

    Methods

    Inherited Methods
    addEventListener(), appendChild(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), hasChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), removeChild(), removeEventListener(), replaceChild(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData

    TBD

    Document Tags and Contributors

    Contributors to this page: Sheppy, kiteroa, Taken, Ptak82, Mgjbot, Pmash, Dria
    Last updated by: Sheppy,