rem: tb.setAttribute("maxwidth", "250"); tb.setAttribute("flex", "1"); 
context: function getTabForObject (source, create){    var name;    if (!ASSERT(source, "UNDEFINED passed to getTabForObject"))        return null;    if ("viewName" in source)    {        name = source.viewName;    }    else    {        ASSERT(0, "INVALID OBJECT passed to getTabForObject");        return null;    }    var tb, id = "tb[" + name + "]";    var matches = 1;    for (var i in client.viewsArray)    {        if (client.viewsArray[i].source == source)        {            tb = client.viewsArray[i].tb;            break;        }        else            if (client.viewsArray[i].tb.getAttribute("id") == id)                id = "tb[" + name + "<" + (++matches) + ">]";    }    if (!tb && create) /* not found, create one */    {        if (!("messages" in source) || source.messages == null)            createMessages(source);        var views = document.getElementById ("views-tbar-inner");        tb = document.createElement ("tab");        tb.setAttribute("ondraggesture",                        "nsDragAndDrop.startDrag(event, tabDNDObserver);");        tb.setAttribute("href", source.getURL());        tb.setAttribute("name", source.unicodeName);        tb.setAttribute("onclick", "onTabClick(event, " + id.quote() + ");");        tb.setAttribute("maxwidth", "250");        tb.setAttribute("flex", "1");        tb.setAttribute("crop", "center");        tb.setAttribute("context", "context:tab");        tb.setAttribute("tooltip", "xul-tooltip-mode");        tb.setAttribute("class", "tab-bottom view-button");        tb.setAttribute("id", id);        tb.setAttribute("state", "normal");        client.viewsArray.push ({source: source, tb: tb});        tb.setAttribute ("viewKey", client.viewsArray.length - 1);        tb.view = source;        if (matches > 1)            tb.setAttribute("label", name + "<" + matches + ">");        else            tb.setAttribute("label", name);        views.appendChild(tb);        var browser = document.createElement ("browser");        browser.setAttribute("class", "output-container");        browser.setAttribute("type", "content");        browser.setAttribute("flex", "1");        browser.setAttribute("tooltip", "html-tooltip-node");        browser.setAttribute("context", "context:messages");        //browser.setAttribute ("onload", "scrollDown(true);");        browser.setAttribute("onclick",                             "return onMessageViewClick(event)");        browser.setAttribute("ondragover",                             "nsDragAndDrop.dragOver(event, " +                             "contentDropObserver);");        browser.setAttribute("ondragdrop",                             "nsDragAndDrop.drop(event, contentDropObserver);");        browser.setAttribute("ondraggesture",                             "nsDragAndDrop.startDrag(event, " +                             "contentAreaDNDObserver);");        browser.source = source;        source.frame = browser;        ASSERT(client.deck, "no deck?");        client.deck.appendChild (browser);        syncOutputFrame (source);    }    return tb;}
meta: 3298	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3298/1afb63e2d380de753b07e299ca3934070dd2a4bc/static.js/buggy/xul/content/static.js