mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-27 13:59:01 -05:00
This commit is contained in:
parent
9eae36f50d
commit
18a084574e
1 changed files with 5 additions and 1 deletions
|
@ -177,7 +177,11 @@ module.exports = Common;
|
|||
* @return {boolean} True if the object is a HTMLElement, otherwise false
|
||||
*/
|
||||
Common.isElement = function(obj) {
|
||||
return obj instanceof HTMLElement;
|
||||
if (typeof HTMLElement !== 'undefined') {
|
||||
return obj instanceof HTMLElement;
|
||||
}
|
||||
|
||||
return !!(obj.nodeType && obj.nodeName);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue