Skip to content

Commit 295cffe

Browse files
committed
refactored Common.isElement
1 parent d63b0c2 commit 295cffe

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/core/Common.js

-8
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,7 @@ module.exports = Common;
177177
* @return {boolean} True if the object is a HTMLElement, otherwise false
178178
*/
179179
Common.isElement = function(obj) {
180-
// http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
181-
try {
182180
return obj instanceof HTMLElement;
183-
}
184-
catch(e){
185-
return (typeof obj==="object") &&
186-
(obj.nodeType===1) && (typeof obj.style === "object") &&
187-
(typeof obj.ownerDocument ==="object");
188-
}
189181
};
190182

191183
/**

0 commit comments

Comments
 (0)