OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 :visited:before, :visited *:before { | 4 :visited:before, :visited *:before { |
5 content: "visited"; | 5 content: "visited"; |
6 color: red; | 6 color: red; |
7 border: lime 10px solid; | 7 border: lime 10px solid; |
8 fill: red; | 8 fill: red; |
9 stroke: red; | 9 stroke: red; |
10 } | 10 } |
(...skipping 29 matching lines...) Expand all Loading... |
40 oLink.appendChild(document.createTextNode(sUrl)); | 40 oLink.appendChild(document.createTextNode(sUrl)); |
41 oLink.onclick = function () { return false;} | 41 oLink.onclick = function () { return false;} |
42 return oLink | 42 return oLink |
43 } | 43 } |
44 function readStyleProperties(oStyleDeclaration) { | 44 function readStyleProperties(oStyleDeclaration) { |
45 var dxStyleProperties = {}; | 45 var dxStyleProperties = {}; |
46 for (var i = 0; i < oStyleDeclaration.length; i++) { | 46 for (var i = 0; i < oStyleDeclaration.length; i++) { |
47 var sPropertyName = oStyleDeclaration.item(i); | 47 var sPropertyName = oStyleDeclaration.item(i); |
48 var dxPropertyAttributes = { | 48 var dxPropertyAttributes = { |
49 'value': oStyleDeclaration.getPropertyValue(sPropertyName), | 49 'value': oStyleDeclaration.getPropertyValue(sPropertyName), |
50 // 'CSS value': oStyleDeclaration.getPropertyCSSValue(sPropertyName
), | |
51 'priority': oStyleDeclaration.getPropertyPriority(sPropertyName) | 50 'priority': oStyleDeclaration.getPropertyPriority(sPropertyName) |
52 }; | 51 }; |
53 dxStyleProperties[sPropertyName] = dxPropertyAttributes; | 52 dxStyleProperties[sPropertyName] = dxPropertyAttributes; |
54 } | 53 } |
55 return dxStyleProperties; | 54 return dxStyleProperties; |
56 } | 55 } |
57 function compareStyles(oLink1, oLink2) { | 56 function compareStyles(oLink1, oLink2) { |
58 var dxStyleProperties1 = readStyleProperties(getComputedStyle(oLink1, ":
:before")); | 57 var dxStyleProperties1 = readStyleProperties(getComputedStyle(oLink1, ":
:before")); |
59 var dxStyleProperties2 = readStyleProperties(getComputedStyle(oLink2, ":
:before")); | 58 var dxStyleProperties2 = readStyleProperties(getComputedStyle(oLink2, ":
:before")); |
60 var asExtraProperties = [], asDifferentProperties = [], asMissingPropert
ies = []; | 59 var asExtraProperties = [], asDifferentProperties = [], asMissingPropert
ies = []; |
(...skipping 17 matching lines...) Expand all Loading... |
78 } | 77 } |
79 asDifferences = []; | 78 asDifferences = []; |
80 if (asExtraProperties.length > 0) asDifferences.push('Extra properties:
' + asExtraProperties.join(', ') + '.'); | 79 if (asExtraProperties.length > 0) asDifferences.push('Extra properties:
' + asExtraProperties.join(', ') + '.'); |
81 if (asMissingProperties.length > 0) asDifferences.push('Missing properti
es: ' + asMissingProperties.join(', ') + '.'); | 80 if (asMissingProperties.length > 0) asDifferences.push('Missing properti
es: ' + asMissingProperties.join(', ') + '.'); |
82 if (asDifferentProperties.length > 0) asDifferences.push('Different prop
erties: ' + asDifferentProperties.join(', ') + '.'); | 81 if (asDifferentProperties.length > 0) asDifferences.push('Different prop
erties: ' + asDifferentProperties.join(', ') + '.'); |
83 return asDifferences; | 82 return asDifferences; |
84 } | 83 } |
85 </script> | 84 </script> |
86 </body> | 85 </body> |
87 </html> | 86 </html> |
OLD | NEW |