add: dump("*** Removing Sidebar: " + container.firstChild); container.removeChild(container.firstChild); 
context: function toggleOpenClose() {  // Get the open width and update the pref state  var pref = Components.classes['component://netscape/preferences'];  if (pref) {   pref = pref.getService();  }  if (pref) {    pref = pref.QueryInterface(Components.interfaces.nsIPref);  }  var width = 0;  if (pref) {    pref.SetBoolPref('sidebar.open', !isSidebarOpen);    width = pref.GetIntPref('sidebar.width');    pref.SavePrefFile();  }  if (isSidebarOpen)  {    // Close it    var container = document.getElementById('container');    var sidebar = container.firstChild;    sidebar.setAttribute('style','width:0px; visibility:hidden');    sidebar.setAttribute('src','about:blank');    //container.removeChild(container.firstChild);    var grippy = document.getElementById('grippy');    grippy.setAttribute('open','');    isSidebarOpen = false;  }  else  {    // Open it    var container = document.getElementById('container');    var sidebar = container.firstChild;    sidebar.setAttribute('style','width:' + width + 'px; visibility:visible');    sidebar.setAttribute('src',sidebarURI);    //var sidebar = document.createElement('html:iframe');    //sidebar.setAttribute('src','resource:/res/rdf/sidebar-browser.xul');    //sidebar.setAttribute('class','sidebarframe');    //container.insertBefore(sidebar,container.firstChild);    //container.appendChild(sidebar);    var grippy = document.getElementById('grippy');    grippy.setAttribute('open','true');    isSidebarOpen = true;  }  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/2e60204896a9ee0002a1cd75e4d773c951971f25/contentframe.js/clean/xpfe/browser/src/contentframe.js