Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e8ac57c

Browse files
author
Misko Hevery
committed
tests pass on chrome
1 parent 7c49b25 commit e8ac57c

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

test/testabilityPatch.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,12 @@ function sortedHtml(element) {
6464
}
6565
attrs.sort();
6666
html += attrs.join('');
67-
var style = [];
68-
for(var name in node.style) {
69-
var value = node.style[name];
70-
if (value && isString(value) && (name != 1*name) && (name != 'cssText')) {
71-
style.push(name + ': ' + value + ';');
72-
}
73-
}
74-
style.sort();
75-
if (style.length) {
76-
html += ' style="' + style.join(' ') + '"';
67+
if (node.style && node.style.cssText) {
68+
var style = node.style.cssText.split('; ');
69+
style.sort();
70+
if (style[0] == '')
71+
style.shift();
72+
html += ' style="' + style.join('; ') + ';"';
7773
}
7874
html += '>';
7975
var children = node.childNodes;

0 commit comments

Comments
 (0)