rem: if (__tmpElement.attributes.length > 0) { 
add:  if (__tmpElement && __tmpElement.attributes && __tmpElement.attributes.length > 0) { 
context: MochiKit.DOM.__new__ = function (win) {    var m = MochiKit.Base;    this._document = document;    this._window = win;    this.domConverters = new m.AdapterRegistry();         var __tmpElement = this._document.createElement("span");    var attributeArray;    if (__tmpElement.attributes.length > 0) {        // for braindead browsers (IE) that insert extra junk        var filter = m.filter;        attributeArray = function (node) {            return filter(attributeArray.ignoreAttrFilter, node.attributes);        }        attributeArray.ignoreAttr = {};        MochiKit.Iter.forEach(__tmpElement.attributes, function (a) {            attributeArray.ignoreAttr[a.name] = a.value;        });        attributeArray.ignoreAttrFilter = function (a) {            return (attributeArray.ignoreAttr[a.name] != a.value);        }        attributeArray.compliant = false;        attributeArray.renames = {            "class": "className",            "checked": "defaultChecked"        };    } else {        attributeArray = function (node) {            /***                                Return an array of attributes for a given node,                filtering out attributes that don't belong for                that are inserted by "Certain Browsers".            ***/            return node.attributes;        }        attributeArray.compliant = true;        attributeArray.renames = {};    }    this.attributeArray = attributeArray;    // shorthand for createDOM syntax    var createDOMFunc = this.createDOMFunc;    this.UL = createDOMFunc("ul");    this.OL = createDOMFunc("ol");    this.LI = createDOMFunc("li");    this.TD = createDOMFunc("td");    this.TR = createDOMFunc("tr");    this.TBODY = createDOMFunc("tbody");    this.THEAD = createDOMFunc("thead");    this.TFOOT = createDOMFunc("tfoot");    this.TABLE = createDOMFunc("table");    this.TH = createDOMFunc("th");    this.INPUT = createDOMFunc("input");    this.SPAN = createDOMFunc("span");    this.A = createDOMFunc("a");    this.DIV = createDOMFunc("div");    this.IMG = createDOMFunc("img");    this.BUTTON = createDOMFunc("button");    this.TT = createDOMFunc("tt");    this.PRE = createDOMFunc("pre");    this.H1 = createDOMFunc("h1");    this.H2 = createDOMFunc("h2");    this.H3 = createDOMFunc("h3");    this.BR = createDOMFunc("br");    this.HR = createDOMFunc("hr");    this.LABEL = createDOMFunc("label");    this.TEXTAREA = createDOMFunc("textarea");    this.FORM = createDOMFunc("form");    this.P = createDOMFunc("p");    this.SELECT = createDOMFunc("select");    this.OPTION = createDOMFunc("option");    this.OPTGROUP = createDOMFunc("optgroup");    this.LEGEND = createDOMFunc("legend");    this.FIELDSET = createDOMFunc("fieldset");    this.hideElement = m.partial(this.setDisplayForElement, "none");    this.showElement = m.partial(this.setDisplayForElement, "block");    this.removeElement = this.swapDOM;    this.$ = this.getElement;    this.EXPORT_TAGS = {        ":common": this.EXPORT,        ":all": m.concat(this.EXPORT, this.EXPORT_OK)    };    m.nameFunctions(this);};
meta: 7995	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7995/b0137a328d480cb625daa4707948b5d990258eea/DOM.js/buggy/web/lib/MochiKit/DOM.js