I\'m not sure my current implementation is available all the time:
function isNodeList(nodes) {
var result = Object.prototype.toString.call(nodes);
/
script:
Element.prototype.isNodeList = function() {return false;}
NodeList.prototype.isNodeList = HTMLCollection.prototype.isNodeList = function(){return true;}
use like this:
var d; // HTMLCollection|NodeList|Element
if(d.isNodeList()){
/*
it is HTMLCollection or NodeList
write your code here
*/
}else{
/*
it is not HTMLCollection and NodeList
write your code here
*/
}