tests pass on chrome

This commit is contained in:
Misko Hevery 2010-04-12 19:16:30 -07:00
parent 7c49b25548
commit e8ac57caae

View file

@ -64,16 +64,12 @@ function sortedHtml(element) {
} }
attrs.sort(); attrs.sort();
html += attrs.join(''); html += attrs.join('');
var style = []; if (node.style && node.style.cssText) {
for(var name in node.style) { var style = node.style.cssText.split('; ');
var value = node.style[name]; style.sort();
if (value && isString(value) && (name != 1*name) && (name != 'cssText')) { if (style[0] == '')
style.push(name + ': ' + value + ';'); style.shift();
} html += ' style="' + style.join('; ') + ';"';
}
style.sort();
if (style.length) {
html += ' style="' + style.join(' ') + '"';
} }
html += '>'; html += '>';
var children = node.childNodes; var children = node.childNodes;