rem: var showChrome = PrefUtils.getPref("inspector.showChrome"); 
add: var menu = aEvent.target; 
context:   showInspectDocumentList: function()  {    const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";    var showChrome = PrefUtils.getPref("inspector.showChrome");    var ww = Components.classes["@mozilla.org/appshell/window-mediator;1"]                       .getService(Components.interfaces.nsIWindowMediator);    var windows = ww.getXULWindowEnumerator(null);    var contentDocs = [];    var chromeDocs = [];    while (windows.hasMoreElements()) {      try {        // Get the window's main docshell        var windowDocShell = windows.getNext()                            .QueryInterface(Components.interfaces.nsIXULWindow).docShell;        // Put the window's documents into the appropriate arrays        this.appendContainedDocuments(contentDocs, windowDocShell,                                       nsIDocShellTreeItem.typeContent);        if (showChrome) {          this.appendContainedDocuments(chromeDocs, windowDocShell,                                         nsIDocShellTreeItem.typeChrome);        }      }      catch (ex) {        // We've failed with this window somehow, but we're catching the error so the        // others will still work        dump(ex + "\n");      }    }    // Clear out any previous menu    this.emptyChildren(this.mInspectDocumentMenu);    // Now add what we found to the menu    var docNumber = 0;    for (var i = 0; i < contentDocs.length; i++) {      this.addInspectDocumentMenuItem(contentDocs[i], ++docNumber);    }    if (showChrome) {      // Put a separator in if there were content docs      if (contentDocs.length > 0) {        this.mInspectDocumentMenu.appendChild(document.createElementNS(XULNS, "menuseparator"));      }      for (var i = 0; i < chromeDocs.length; i++) {        this.addInspectDocumentMenuItem(chromeDocs[i], ++docNumber);      }    } else {      // If we're not showing chrome, there's a possibility there are no documents      // at all.      if (contentDocs.length == 0) {        var noneMenuItem = document.createElementNS(XULNS, "menuitem");        noneMenuItem.setAttribute("label", this.mPanelSet.stringBundle                                               .getString("inspectWindow.noDocuments.message"));        noneMenuItem.setAttribute("disabled", true);        this.mInspectDocumentMenu.appendChild(noneMenuItem);      }    }  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/8ccb097b70ffec9c44999eb5395b7da39b848150/inspector.js/buggy/extensions/inspector/resources/content/inspector.js