rem: var bookmarksView = document.getElementById("bookmarks-view"); 
add: const windowNode = document.getElementById("bookmark-window"); const bookmarksView = document.getElementById("bookmarks-view"); var titleString; 
context: function Startup(){  var bookmarksView = document.getElementById("bookmarks-view");  const windowNode = document.getElementById("bookmark-window");  // If we've been opened with a parameter, root the tree on it.  if ("arguments" in window && window.arguments[0]) {    var uri = window.arguments[0];    bookmarksView.tree.setAttribute("ref", uri);    var title = "";    if (uri.substring(0,5) == "find:") {      title = bookmarksView._bundle.GetStringFromName("search_results_title");      // Update the windowtype so that future searches are directed       // there and the window is not re-used for bookmarks.       windowNode.setAttribute("windowtype", "bookmarks:searchresults");    }    else {      const krNameArc = bookmarksView.rdf.GetResource(NC_NS + "Name");      const krRoot = bookmarksView.rdf.GetResource(window.arguments[0]);      var rName = bookmarksView.db.GetTarget(krRoot, krNameArc, true);      title = rName.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;    }    const titleString = bookmarksView._bundle.GetStringFromName("window_title");    windowNode.setAttribute("title", titleString.replace(/%folder_name%/gi, title));  }  else {    var rootfoldername = bookmarksView._bundle.GetStringFromName("bookmarks_root");    const kProfileContractID = "@mozilla.org/profile/manager;1";    const kProfileIID = Components.interfaces.nsIProfile;    const kProfile = Components.classes[kProfileContractID].getService(kProfileIID);    rootfoldername = rootfoldername.replace(/%user_name%/, kProfile.currentProfile);    windowNode.setAttribute("title", rootfoldername);  }   bookmarksView.treeBoxObject.selection.select(0);  bookmarksView.tree.focus();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/e99a698488a28389e57e9d2b67fb4d2966d7766f/bookmarks.js/buggy/xpfe/components/bookmarks/resources/bookmarks.js