From 295cffeacfaf01af83bd19ea3710cf58e50843ed Mon Sep 17 00:00:00 2001 From: liabru Date: Tue, 9 May 2017 00:41:05 +0100 Subject: [PATCH] refactored Common.isElement --- src/core/Common.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/core/Common.js b/src/core/Common.js index 681a53f..b3c1c69 100644 --- a/src/core/Common.js +++ b/src/core/Common.js @@ -177,15 +177,7 @@ module.exports = Common; * @return {boolean} True if the object is a HTMLElement, otherwise false */ Common.isElement = function(obj) { - // http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object - try { return obj instanceof HTMLElement; - } - catch(e){ - return (typeof obj==="object") && - (obj.nodeType===1) && (typeof obj.style === "object") && - (typeof obj.ownerDocument ==="object"); - } }; /**