add:   var event = document.createEvent('Events'); event.initEvent('messagepane-loaded', false, true); var headerViewElement = document.getElementById("msgHeaderView"); headerViewElement.dispatchEvent(event); 
context: function OnLoadMsgHeaderPane(){  // HACK...force our XBL bindings file to be load before we try to create our first xbl widget....  // otherwise we have problems.  document.loadBindingDocument('chrome://messenger/content/mailWidgets.xml');    // load any preferences that at are global with regards to   // displaying a message...  gNumAddressesToShow = pref.getIntPref("mailnews.max_header_display_length");  gCollectIncoming = pref.getBoolPref("mail.collect_email_address_incoming");  gCollectNewsgroup = pref.getBoolPref("mail.collect_email_address_newsgroup");  gShowUserAgent = pref.getBoolPref("mailnews.headers.showUserAgent");  initializeHeaderViewTables();  var toggleHeaderView = document.getElementById("msgHeaderView");  var initialCollapsedSetting = toggleHeaderView.getAttribute("state");  if (initialCollapsedSetting == "true")    gCollapsedHeaderViewMode = true;   }
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/eb13ead84fdade33b3cd5ba4c3b36e78105134a5/msgHdrViewOverlay.js/clean/mailnews/base/resources/content/msgHdrViewOverlay.js