rem: const formWrapper = new XPCNativeWrapper(form, "name", "elements", "encoding", "target", "getElementsByTagName()"); 
context: function onFormSelect(){  var formTree = document.getElementById("formtree");  if (!formView.rowCount) return;  if (formView.selection.count == 1)  {    var formPreview = document.getElementById("formpreview");    fieldView.clear();    formPreview.treeBoxObject.view = fieldView;    var clickedRow = formView.selection.currentIndex;    // form-node;    var form = formView.data[clickedRow][3];    const formWrapper = new XPCNativeWrapper(form,      "name", "elements", "encoding", "target", "getElementsByTagName()");    var ft = null;    if (formWrapper.name)      ft = theBundle.getFormattedString("formTitle", [formWrapper.name]);    setItemValue("formenctype", formWrapper.encoding, theBundle.getString("default"));    setItemValue("formtarget", formWrapper.target, theBundle.getString("formDefaultTarget"));    document.getElementById("formname").value = ft || theBundle.getString("formUntitled");    var formfields = formWrapper.elements;    var length = formfields.length;    var checked = theBundle.getString("formChecked");    var unchecked = theBundle.getString("formUnchecked");        for (var i = 0; i < length; i++)    {      var elem = formfields[i], val;      if (elem instanceof nsIButtonElement)        val = getValueText(elem);      else        val = (/^password$/i.test(elem.type)) ? theBundle.getString("formPassword") : elem.value;      fieldView.addRow(["", elem.name, elem.type, val]);    }    var labels = formWrapper.getElementsByTagName("label");    var llength = labels.length;    var label;    for (i = 0; i < llength; i++)    {      label = labels[i];      var whatfor = label.hasAttribute("for") ?        theDocument.getElementById(label.getAttribute("for")) :        findFirstControl(label);      if (whatfor && (whatfor.form == form))       {        var labeltext = getValueText(label);        for (var j = 0; j < length; j++)          if (formfields[j] == whatfor) {            var col = formPreview.columns["field-label"];            fieldView.setCellText(j, col, labeltext);          }      }    }  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/f3839908cbd41df5490c1c7c21027b828838d660/pageInfo.js/clean/browser/base/content/pageInfo.js