rem: sidebar.setAttribute('style','width:' + width + 'px; visibility:visible'); sidebar.setAttribute('src',sidebarURI); dump("Opening sidebar...");  if (counter > 0) { var sidebar = document.createElement('html:iframe'); sidebar.setAttribute('src','resource:/res/rdf/sidebar-browser.xul'); sidebar.setAttribute('class','sidebarframe'); sidebar.setAttribute('id','sidebarframe'); sidebar.setAttribute('style','width:' + width + 'px; visibility:visible'); dump("*** Inserting sidebar before: " + container.firstChild); container.insertBefore(sidebar,container.firstChild);  } 
add:  sidebar.setAttribute('style', 'width:' + width + 'px; visibility:visible'); sidebar.setAttribute('src',   sidebarURI); sidebar.setAttribute('class', 'sidebarframe'); sidebar.setAttribute('id',    'sidebarframe');   
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');  }  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');	dump("*** Removing Sidebar: " + container.firstChild);    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);	dump("Opening sidebar...");		if (counter > 0) {      var sidebar = document.createElement('html:iframe');      sidebar.setAttribute('src','resource:/res/rdf/sidebar-browser.xul');      sidebar.setAttribute('class','sidebarframe');	  sidebar.setAttribute('id','sidebarframe');	  sidebar.setAttribute('style','width:' + width + 'px; visibility:visible');	  dump("*** Inserting sidebar before: " + container.firstChild);      container.insertBefore(sidebar,container.firstChild);	      //container.appendChild(sidebar);    }        var grippy = document.getElementById('grippy');    grippy.setAttribute('open','true');    isSidebarOpen = true;  }    counter++;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f91b10a7866fe2ed8cee17278a02dee735709b1b/contentframe.js/clean/xpfe/browser/src/contentframe.js