add: /* Workaround: Because we use select(-1) instead of clearSelection() * (see bug 197667) the tree will then give us selection ranges * starting from -1 instead of 0! (See bug 319066.) */ if (start.value == -1) start.value = 0; 
context: function getSelectedNicknames(tree){    var rv = [];    if (!tree || !tree.view || !tree.view.selection)        return rv;    var rangeCount = tree.view.selection.getRangeCount();    // Loop through the selection ranges.    for (var i = 0; i < rangeCount; ++i)    {        var start = {}, end = {};        tree.view.selection.getRangeAt(i, start, end);        // If they == -1, we've got no selection, so bail.        if ((start.value == -1) && (end.value == -1))            continue;        // Loop through the contents of the current selection range.        for (var k = start.value; k <= end.value; ++k)        {            var item = tree.contentView.getItemAtIndex(k).firstChild.firstChild;            var userName = item.getAttribute("unicodeName");            rv.push(userName);        }    }    return rv;}
meta: 1622	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1622/62594bb8f1736622a1d0e823909b7f7620c598b2/static.js/buggy/xul/content/static.js