From e5340d8e2cbd8ec0446908c4aa3b501b7dfc3d7f Mon Sep 17 00:00:00 2001 From: Andy Joslin Date: Mon, 17 Feb 2014 21:51:15 -0500 Subject: [PATCH] style(dom-trace): always console.debug() so is easier to filter out --- js/ext/angular/test/dom-trace.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/js/ext/angular/test/dom-trace.js b/js/ext/angular/test/dom-trace.js index 6313f2c0af..596faeef4c 100644 --- a/js/ext/angular/test/dom-trace.js +++ b/js/ext/angular/test/dom-trace.js @@ -19,7 +19,7 @@ var msgs = []; msgs.push( 'Class, ' + createElementId(m.target) ); - + if(m.oldValue !== m.target.className) { var exisitingClasses = (m.oldValue ? m.oldValue.split(' ') : []); var currentClasses = m.target.className.split(' '); @@ -71,7 +71,7 @@ } else if(m.attributeName == 'style') { var msgs = []; - + msgs.push( 'Style, ' + createElementId(m.target) ); if(m.oldValue) msgs.push( 'from ' + m.oldValue ); @@ -121,13 +121,13 @@ } } if(el.id.length) id += '#' + el.id; - + var href = el.getAttribute('href'); if(href) { href = href.split('/'); id += '[href=' + href[href.length -1] + ']'; } - + var ngClick = el.getAttribute('ng-click'); if(ngClick) { id += '[ng-click=' + ngClick + ']'; @@ -159,12 +159,12 @@ msgs.unshift( d.getSeconds() + '.' + d.getMilliseconds() ); var msg = msgs.join(', '); - console.log("%c" + msg, + console.debug("%c" + msg, "color:" + color); clearTimeout(timeId) timeId = setTimeout(function(){ - console.log('Manipulations:', totalManipulations) + console.debug('Manipulations:', totalManipulations) totalManipulations = 0; }, 1200); } @@ -180,13 +180,13 @@ console.debug('Dom Trace, observe:', selector); - var observer = new MutationObserver(function(mutations) { + var observer = new MutationObserver(function(mutations) { mutations.forEach(logMutation); }); - + observer.observe(el, { - attributes: true, - childList: false, + attributes: true, + childList: false, subtree: true, attributeOldValue: true, //characterData: true,