Created
May 5, 2016 22:08
-
-
Save beatak/72a3093de5d61feb25851514f5f8cd84 to your computer and use it in GitHub Desktop.
for ghetto print debug
This file contains hidden or 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
var serializeDOM = function (dom) { | |
var result = []; | |
result.push(dom.tagName.toLowerCase()); | |
if (dom.id) { | |
result.push('id="' + dom.id + '"'); | |
} | |
if (dom.className) { | |
result.push('class="' + dom.className + '"'); | |
} | |
return '<' + result.join(' ') + '>'; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment