We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d63b0c2 commit 295cffeCopy full SHA for 295cffe
src/core/Common.js
@@ -177,15 +177,7 @@ module.exports = Common;
177
* @return {boolean} True if the object is a HTMLElement, otherwise false
178
*/
179
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 {
182
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
189
};
190
191
/**
0 commit comments