rem: var globalHistory = Components.classes["@mozilla.org/browser/global-history;1"] .getService(Components.interfaces.nsIGlobalHistory); if (!globalHistory.isVisited(href)) { globalHistory.addPage(href); var oldHref = linkNode.getAttribute("href"); if (typeof oldHref == "string") {   linkNode.setAttribute("href", ""); linkNode.setAttribute("href", oldHref); } else {   } } 
add: var globalHistory = Components.classes["@mozilla.org/browser/global-history;2"] .getService(Components.interfaces.nsIGlobalHistory2);  var uri = makeURL(href); if (!globalHistory.isVisited(uri)) { globalHistory.addPage(uri, false, false); var oldHref = linkNode.getAttribute("href"); if (typeof oldHref == "string") {   linkNode.setAttribute("href", ""); linkNode.setAttribute("href", oldHref); } else {   } } 
context: function markLinkVisited(href, linkNode){   var globalHistory = Components.classes["@mozilla.org/browser/global-history;1"]                               .getService(Components.interfaces.nsIGlobalHistory);   if (!globalHistory.isVisited(href)) {     globalHistory.addPage(href);     var oldHref = linkNode.getAttribute("href");     if (typeof oldHref == "string") {       // Use setAttribute instead of direct assignment.       // (bug 217195, bug 187195)       linkNode.setAttribute("href", "");       linkNode.setAttribute("href", oldHref);     }     else {       // Converting to string implicitly would be a        // minor security hole (similar to bug 202994).     }   }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/7a922f66fdefe01b355c50b90a67e5b12da14c9f/contentAreaUtils.js/clean/browser/base/content/contentAreaUtils.js