rem: button.setAttribute("style", "font-weight: bold"); 
add: button.setAttribute("checked", "true"); 
context: function UpdateStructToolbar(){  var editor = GetCurrentEditor();  if (!editor) return;  var mixed = GetSelectionContainer();  if (!mixed) return;  var element = mixed.node;  var oneElementSelected = mixed.oneElementSelected;  if (!element) return;  if (element == gLastFocusNode &&      oneElementSelected == gLastFocusNodeWasSelected)    return;  gLastFocusNode = element;  gLastFocusNodeWasSelected = mixed.oneElementSelected;  var toolbar = document.getElementById("statusText");  if (!toolbar) return;  var childNodes = toolbar.childNodes;  var childNodesLength = childNodes.length;  var i;  for (i = childNodesLength-1; i >= 0; i--) {    toolbar.removeChild(childNodes.item(i));  }  toolbar.removeAttribute("label");  if ( IsInHTMLSourceMode() ) {    // we have destroyed the contents of the status bar and are    // about to recreate it ; but we don't want to do that in    // Source mode    return;  }  var tag, button;  var bodyElement = GetBodyElement();  var isFocusNode = true;  var tmp;  do {    tag = element.nodeName.toLowerCase();    button = document.createElementNS(XUL_NS, "toolbarbutton");    button.setAttribute("label",   "<" + tag + ">");    button.setAttribute("value",   tag);    button.setAttribute("context", "structToolbarContext");    toolbar.insertBefore(button, toolbar.firstChild);    button.addEventListener("command", newCommandListener(element), false);    button.addEventListener("contextmenu", newContextmenuListener(button, element), false);    if (isFocusNode && oneElementSelected) {      button.setAttribute("style", "font-weight: bold");      isFocusNode = false;    }    tmp = element;    element = element.parentNode;  } while (tmp != bodyElement);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f7659825e8803331c696aa11688ab5cdcdf39526/editor.js/clean/editor/ui/composer/content/editor.js