We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9eae36f commit 18a0845Copy full SHA for 18a0845
1 file changed
src/core/Common.js
@@ -177,7 +177,11 @@ module.exports = Common;
177
* @return {boolean} True if the object is a HTMLElement, otherwise false
178
*/
179
Common.isElement = function(obj) {
180
- return obj instanceof HTMLElement;
+ if (typeof HTMLElement !== 'undefined') {
181
+ return obj instanceof HTMLElement;
182
+ }
183
+
184
+ return !!(obj.nodeType && obj.nodeName);
185
};
186
187
/**
0 commit comments