rem: for (var i = 0; i < node.childNodes.length + 1; i++) { print("item " + i + ": " + node.childNodes.item(i)); 
add: for (var i = 0; i < childNodes.length + 1; i++) { print("item " + i + ": " + childNodes.item(i)); 
context: function test(){    print("Node is " + Node);    for (var p in Node)        print(p + ": " + Node[p]);        node = new Node();    print("node is " + node);    for (var p in node)        print(p + ": " + node[p]);    child1 = new Node();    child2 = new Node();    child3 = new Node();        node.appendChild(child1);    node.appendChild(child2);    for (var i = 0; i < node.childNodes.length + 1; i++) {        print("item " + i + ": " + node.childNodes.item(i));    }        for (var i = 0; i < node.childNodes.length + 1; i++) {        print(i + ": " + node.childNodes[i]);    }    node.removeChild(child1);    node.replaceChild(child3, child2);        for (var i = 0; i < node.childNodes.length + 1; i++) {        print("item " + i + ": " + node.childNodes.item(i));    }    for (var i = 0; i < node.childNodes.length + 1; i++) {        print(i + ": " + node.childNodes[i]);    }    try {        node.appendChild(null);    } catch(e) {        print("caught: " + e);    }        try {        var o = new Object();        o.appendChild = node.appendChild;        o.appendChild(node);    } catch(e) {        print("caught: " + e);    }        try {        node.appendChild();    } catch(e) {        print("caught: " + e);    }        oldNodeType = node.nodeType;    node.nodeType = 1;    shouldBe("node.nodeType", oldNodeType);        shouldBe("node instanceof Node", true);    shouldBe("new Object() instanceof Node", false);        print(Node);    /*    var element, name, weapon;        var document = new Document();    document.appendChild(document.createElement('Root'));    // Tank Girl    element = document.createElement('Hero');    name = document.createElement('Name');    name.appendChild(document.createTextNode('Tank Girl'));    element.appendChild(name);        weapon = document.createElement('Weapon');    weapon.appendChild(document.createTextNode('Tank'));    element.appendChild(weapon);        weapon = document.createElement('Weapon');    weapon.appendChild(document.createTextNode('Attitude'));    element.appendChild(weapon);        weapon = document.createElement('Weapon');    weapon.appendChild(document.createTextNode('Army of genetically engineered super-kangaroos'));    element.appendChild(weapon);        document.firstChild.appendChild(element);    // Skeletor    element = document.createElement('Villain');    name = document.createElement('Name');    name.appendChild(document.createTextNode('Skeletor'));    element.appendChild(name);        weapon = document.createElement('Weapon');    weapon.appendChild(document.createTextNode('Havok Staff'));    element.appendChild(weapon);        weapon = document.createElement('Weapon');    weapon.appendChild(document.createTextNode('Motley crew of henchmen'));    element.appendChild(weapon);        document.firstChild.appendChild(element);    // Serialize    document.serialize();    */}
meta: 5650	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5650/7f19da1cc67fee513207eff51fd0d990f24d4d1f/minidom.js/buggy/JavaScriptCore/API/minidom.js