From edc743e573f1766b18469d59ad142d467fe049ca Mon Sep 17 00:00:00 2001 From: Kee-Yip Chan Date: Mon, 26 Aug 2013 09:59:23 -0700 Subject: [PATCH] Include element classnames in pretty(elem) --- js/page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/page.js b/js/page.js index 961a9b8..c1e455d 100644 --- a/js/page.js +++ b/js/page.js @@ -30,7 +30,7 @@ // display elemens as eg. div#todoapp function pretty(elem) { - return elem.tagName.toLowerCase() + (elem.id && ("#" + elem.id)); + return elem.tagName.toLowerCase() + (elem.id && ("#" + elem.id)) + (elem.className && ('.' + elem.className.split(/\s+/).join('.'))); } // we need to prefix element names if we want to preserve the order