Created
March 5, 2014 03:46
-
-
Save sugarshin/9360788 to your computer and use it in GitHub Desktop.
isDomNode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DOM Node 判定 | |
function isDomNode(e){ | |
if((e && typeof(e.nodeType) == 'number') || e === null){ | |
try{ | |
e.nodeType = e.nodeType; | |
}catch(n){ | |
return true; | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment