Visit Mozilla.org

XUL:where

From MDC

This article covers features introduced in Firefox 3

« XUL Reference home    [ Examples | Attributes | Properties | Methods | Related ]

Indicate a condition that must match for a template result to be used. If the condition is true, the corresponding action body is generated; otherwise the result is ignored and no content is generated.

For more information, see Where Elements.

Attributes
ignorecase, multiple, negate, rel, subject, value

[edit] Examples

(example needed)

[edit] Attributes

ignorecase
Type: boolean
Set to true to indicate that the case does not matter when making comparisons. Otherwise, the default value is false, to indicate that the value should match with the same case.

multiple
Type: boolean
Set to true to indicate that the value contains multiple values separated by commas. Any of the values may match. Otherwise, the entire value string is compared.

negate
Type: boolean
Set to true to indicate that the comparison should be reversed. The where clause matches if the condition is false, and does not match if the condition is true.

rel
Type: one of the values below
The type of comparison to perform.
  • equals: The subject and value must match exactly.
  • less: The numeric value of the subject must be less than the value
  • greater: The numeric value of the subject must be greater than the value
  • before: The string value of subject must come before value alphabetically
  • after: The string value of subject must come after value alphabetically
  • startswith: The value of subject must start with the value
  • endswith: The value of subject must end with the value
  • contains: The value of subject must contain the value as a substring

subject
Type: string
The variable or string to compare.

value
Type: string
The value to compare.

Inherited from XUL element
align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width

[edit] Properties

Inherited from XUL element
align, allowEvents, boxObject, builder, className, collapsed, contextMenu, controllers, currentItem, database, datasources, dir, flex, height, hidden, id, left, listBoxObject, maxHeight, maxWidth, menu, minHeight, minWidth, observes, ordinal, orient, pack, persist, ref, resource, statusText, style, tooltip, tooltipText, top, value, width

Inherited from DOM element
attributes, childNodes, cloneNode, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, tagName

[edit] Methods

Inherited from XUL element
blur, click, doCommand, focus, getElementsByAttribute

Inherited from DOM element
addEventListener, appendChild, dispatchEvent, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeEventListener, replaceChild, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS