Skip to content

Instantly share code, notes, and snippets.

@sugarshin
Created March 5, 2014 03:46
Show Gist options
  • Save sugarshin/9360788 to your computer and use it in GitHub Desktop.
Save sugarshin/9360788 to your computer and use it in GitHub Desktop.
isDomNode
// 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