// function calls it internally, it's the arguments part of the function
functionArgs:function(fn){
varargs,
l=fn.length;
// Get the text from text nodes and CDATA nodes
if(elem.nodeType===3||elem.nodeType===4){
ret+=elem.nodeValue;
if(!l){
return"";
}
// Traverse everything else, except comment nodes
}elseif(elem.nodeType!==8){
ret+=getText(elem.childNodes);
}
}
args=newArray(l);
while(l--){
// 97 is 'a'
args[l]=String.fromCharCode(97+l);
}
return""+args.join(", ")+"";
},
// object calls it internally, the key part of an item in a map
key:quote,
// function calls it internally, it's the content of the function
functionCode:"[code]",
// node calls it internally, it's an html attribute value
attribute:quote,
string:quote,
date:quote,
regexp:literal,
number:literal,
"boolean":literal
},
// if true, entities are escaped ( <, >, \t, space and \n )
HTML:false,
// indentation unit
indentChar:"",
// if true, items in a collection, are separated by a \n, else just a space.
multiline:true
};
returnret;
}
returnjsDump;
}());
//from jquery.js
//from jquery.js
functioninArray(elem,array){
if(array.indexOf){
returnarray.indexOf(elem);
...
...
@@ -1528,73 +2006,76 @@ function inArray( elem, array ) {
*
* Usage: QUnit.diff(expected, actual)
*
* QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
* QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"