rem: if (typeof msgtype == "undefined") msgtype = MT_INFO;  function setAttribs (obj, c, attrs) { if (attrs) { for (var a in attrs) obj.setAttribute (a, attrs[a]); } obj.setAttribute("class", c); obj.setAttribute("msg-type", msgtype); }  var msgRow = htmlTR("msg"); setAttribs(msgRow, "msg");  var msgData = htmlTD(); setAttribs(msgData, "msg-data"); if (typeof message == "string") msgData.appendChild(stringToDOM(message)); else msgData.appendChild(message);  msgRow.appendChild(msgData);  console._outputElement.appendChild(msgRow); console.scrollDown(); 
add: if ("capturedMsgs" in console) console.capturedMsgs.push ([message, msgtype]);  dispatchCommand(console.coDisplayHook, { message: message, msgtype: msgtype }); 
context: function display(message, msgtype){    if (typeof message == "undefined")        throw new BadMojo(ERR_REQUIRED_PARAM, "message");    if (typeof message != "string" &&        !(message instanceof Components.interfaces.nsIDOMHTMLElement))        throw new BadMojo(ERR_INVALID_PARAM, ["message", String(message)]);    if (typeof msgtype == "undefined")        msgtype = MT_INFO;        function setAttribs (obj, c, attrs)    {        if (attrs)        {            for (var a in attrs)                obj.setAttribute (a, attrs[a]);        }        obj.setAttribute("class", c);        obj.setAttribute("msg-type", msgtype);    }    var msgRow = htmlTR("msg");    setAttribs(msgRow, "msg");    var msgData = htmlTD();    setAttribs(msgData, "msg-data");    if (typeof message == "string")        msgData.appendChild(stringToDOM(message));    else        msgData.appendChild(message);    msgRow.appendChild(msgData);    console._outputElement.appendChild(msgRow);    console.scrollDown();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c253059afafb09ee6b27e3767bb1e487e050ba0f/venkman-static.js/buggy/extensions/venkman/resources/content/venkman-static.js