rem: do { e = e.parentNode } while (e.tagName.toLowerCase() != tagName); 
add: do { e = e.parentNode; } while ((e.nodeType == 1) && (e.tagName.toLowerCase() != tagName)); 
context: function getAncestorByTagName(e, tagName) {  tagName = tagName.toLowerCase();  do { e = e.parentNode } while (e.tagName.toLowerCase() != tagName);  return e;}
meta: 1802	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1802/a0ac20344fe639cf9aa52bc54f8dae6c29b24f0b/trac.js/buggy/htdocs/js/trac.js