mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-15 16:38:43 -05:00
nodejs compatibility
This commit is contained in:
parent
0895d81fa1
commit
43d8bf99ee
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) {
|
||||
try {
|
||||
return obj instanceof HTMLElement;
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue