WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIXULSortService

IID:F29270C8-3BE5-4046-9B57-945A84DFF132
Inherits From:nsISupports

A service used to sort the contents of a XUL widget.

This interface is intended to be used as a service. To create an object implementing this interface:

var obj = Components.classes["@mozilla.org/xul/xul-sort-service;1"].
            getService(Components.interfaces.nsIXULSortService);

This interface is implemented by the following components:


Methods

void sort ( nsIDOMNode node , AString sortKey , AString sortDirection )

void sort ( nsIDOMNode node , AString sortKey , AString sortDirection )

Sort the contents of the widget containing aNode using aSortKey as the comparison key, and aSortDirection as the direction.

Arguments:
node: A node in the XUL widget whose children are to be sorted.
sortKey: The value to be used as the comparison key.
sortDirection: May be either natural to return the contents to their natural (unsorted) order, ascending to sort the contents in ascending order, or descending to sort the contents in descending order.

Reference documentation is generated from Mozilla's source.