rem: var parentElem = document.getElementById(parent); if (!ASSERT(parentElem, "setKey: couldn't get parent '" + parent + "' for " + command.name)) return;  var ary = keystr.match (/(.*\s)?([\S]+)$/); var key = document.createElement ("key"); key.setAttribute ("id", "key:" + command.name); key.setAttribute ("oncommand", "dispatch('" + command.name + "');"); key.setAttribute ("modifiers", ary[1]); if (ary[2].indexOf("VK_") == 0) key.setAttribute ("keycode", ary[2]); else key.setAttribute ("key", ary[2]);  parentElem.appendChild(key); command.key = key; command.keystr = keystr; 
add: this.commands[command.name] = command; 
context: function cmgr_add (parent, command, keystr){    var parentElem = document.getElementById(parent);    if (!ASSERT(parentElem, "setKey: couldn't get parent '" + parent +                "' for " + command.name))        return;    var ary = keystr.match (/(.*\s)?([\S]+)$/);    var key = document.createElement ("key");    key.setAttribute ("id", "key:" + command.name);    key.setAttribute ("oncommand",                      "dispatch('" + command.name + "');");    key.setAttribute ("modifiers", ary[1]);    if (ary[2].indexOf("VK_") == 0)        key.setAttribute ("keycode", ary[2]);    else        key.setAttribute ("key", ary[2]);        parentElem.appendChild(key);    command.key = key;    command.keystr = keystr;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c253059afafb09ee6b27e3767bb1e487e050ba0f/command-manager.js/clean/extensions/venkman/resources/content/command-manager.js