rem: /* duplicate this here rather than adding an "onlyOne" arg to NodesByAttribute so adding an extra arg accidentally doesn't change it's behaviour if called directly */ var descend = Divmod.Runtime.Platform.DOM_DESCEND; var terminate = Divmod.Runtime.Platform.DOM_TERMINATE; var xmlns = Nevow.Athena.XMLNS_URI;  var result = null; Divmod.Runtime.theRuntime.traverse( root, function(node) { if (Divmod.Runtime.theRuntime.getAttribute(node, attrName) == attrValue) { result = node; return terminate; } return descend; }); if (result === null) { throw new Error("Failed to discover node with " + attrName + " value " + attrValue + " beneath " + root + " (programmer error)."); } return result; 
add: return Divmod.Runtime.theRuntime.firstNodeByAttribute(root, attrName, attrValue); 
context: Nevow.Athena.FirstNodeByAttribute = function(root, attrName, attrValue) {    /* duplicate this here rather than adding an "onlyOne" arg to       NodesByAttribute so adding an extra arg accidentally doesn't change       it's behaviour if called directly    */    var descend = Divmod.Runtime.Platform.DOM_DESCEND;    var terminate = Divmod.Runtime.Platform.DOM_TERMINATE;    var xmlns = Nevow.Athena.XMLNS_URI;    var result = null;    Divmod.Runtime.theRuntime.traverse(        root,        function(node) {            if (Divmod.Runtime.theRuntime.getAttribute(node, attrName) == attrValue) {                result = node;                return terminate;            }            return descend;        });    if (result === null) {        throw new Error("Failed to discover node with " + attrName +                        " value " + attrValue + " beneath " + root +                        " (programmer error).");    }    return result;};
meta: 1565	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1565/e0cf08b87e7f97d2577198e6cb229d5cb9140f83/athena.js/buggy/nevow/athena.js