rem: node.setAttribute ("sortDirection", sortDirection);  
context: function onSortCol(sortColName){    const nsIXULSortService = Components.interfaces.nsIXULSortService;   /* XXX remove the rdf version once 0.8 is a distant memory    * 2/22/2001    */    const isupports_uri =        (Components.classes["@mozilla.org/xul/xul-sort-service;1"]) ?         "@mozilla.org/xul/xul-sort-service;1" :         "@mozilla.org/rdf/xul-sort-service;1";        var node = document.getElementById(sortColName);    if (!node)        return false;     // determine column resource to sort on    var sortResource = node.getAttribute("resource");    var sortDirection = "ascending";        //node.setAttribute("sortActive", "true");    switch (sortColName)    {        case "usercol-op":            document.getElementById("usercol-voice")                .setAttribute("sortDirection", "natural");            document.getElementById("usercol-nick")                .setAttribute("sortDirection", "natural");            break;        case "usercol-voice":            document.getElementById("usercol-op")                .setAttribute("sortDirection", "natural");            document.getElementById("usercol-nick")                .setAttribute("sortDirection", "natural");            break;        case "usercol-nick":            document.getElementById("usercol-voice")                .setAttribute("sortDirection", "natural");            document.getElementById("usercol-op")                .setAttribute("sortDirection", "natural");            break;    }        var currentDirection = node.getAttribute("sortDirection");        if (currentDirection == "ascending")        sortDirection = "descending";    else if (currentDirection == "descending")        sortDirection = "natural";    else        sortDirection = "ascending";        node.setAttribute ("sortDirection", sortDirection);     var xulSortService =        Components.classes[isupports_uri].getService(nsIXULSortService);    if (!xulSortService)        return false;    try    {        if ("sort" in xulSortService)            xulSortService.sort(node, sortResource, sortDirection);        else            xulSortService.Sort(node, sortResource, sortDirection);    }    catch(ex)    {            //dd("Exception calling xulSortService.sort()");    }        return false;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/9f3f03ee5d3dc088e1cfbe4c27b026331f43e7bd/handlers.js/clean/extensions/irc/xul/content/handlers.js