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