rem: var checkbox = children[i2]; 
add: checkbox = children[i2]; 
context: function DataToUI(){  var data = parent.roaming;  var filesList = E("filesList");  EnableTree(data.Enabled, filesList);  // first, disable all by default  var children = filesList.childNodes;  for (var i = 0, l = children.length; i < l; i++)  {    var checkbox = children[i];    if (!("getAttribute" in checkbox) ||        checkbox.getAttribute("type") != "checkbox")      // Somebody adds unwanted nodes as children to listbox :-(      continue;    checkbox.checked = false;  }  // then check for each file in the list, if it's in the checkboxes.  // enabled it, if so, otherwise create and enable it (for files added by  // the user).  for (i = 0, l = data.Files.length; i < l; i++)  {    var file = data.Files[i];    var found = false;    for (var i2 = 0, l2 = children.length; i2 < l2; i2++)    {      var checkbox = children[i2];      if ("getAttribute" in checkbox          && checkbox.getAttribute("type") == "checkbox"          // Somebody adds unwanted nodes as children to listbox :-(          && checkbox.getAttribute("filename") == file)      {        checkbox.checked = true;        found = true;      }    }    if (!found)    {      var li = document.createElement("listitem");      if (li)      {        li.setAttribute("type", "checkbox");        li.setAttribute("id", file);        li.setAttribute("filename", file);        li.setAttribute("label", file);        li.setAttribute("checked", "true");        filesList.appendChild(li);      }    }  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/b02d2d1d4e536bd3cc15add0c5405fb469f613c8/files.js/clean/extensions/sroaming/resources/content/prefs/files.js