function isNode(o) {
    return (
      typeof Node === "object" ? o instanceof Node :
      typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName==="string"
    );
  }
function isNode(o) {
    return (
      typeof Node === "object" ? o instanceof Node :
      typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName==="string"
    );
  }
function isNode ( o ) { return ( typeof Node === "object" ? o instanceof Node : typeof o === "object" && typeof o . nodeType === "number" && typeof o . nodeName === "string" ) ; }
Taken from http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
Taken from http : // stackoverflow . com / questions / 384286 / javascript - isdom - how - do - you - check - if - a - javascript - object - is - a - dom - object