判定是否元素节点

isDOMElement = !!(typeof HTMLElement!=='undefined'&&x instanceof HTMLElement||(typeof x==='object'&&!!x.tagName&&!(x instanceof Object)));
原文地址:https://www.cnblogs.com/rubylouvre/p/1930542.html