OLD | NEW |
1 // Generates code for a CSS paint API function which logs the given properties | 1 // Generates code for a CSS paint API function which logs the given properties |
2 // to the console. | 2 // to the console. |
3 // | 3 // |
4 // Usage: | 4 // Usage: |
5 // generatePaintStyleLogging([ | 5 // generatePaintStyleLogging([ |
6 // '--foo', | 6 // '--foo', |
7 // 'line-height', | 7 // 'line-height', |
8 // ]); | 8 // ]); |
9 | 9 |
10 function generatePaintStyleLogging(properties) { | 10 function generatePaintStyleLogging(properties) { |
(...skipping 10 matching lines...) Expand all Loading... |
21 serialized = '[' + value.constructor.name + '=' + value.
cssText + ']'; | 21 serialized = '[' + value.constructor.name + '=' + value.
cssText + ']'; |
22 } else { | 22 } else { |
23 serialized = '[null]'; | 23 serialized = '[null]'; |
24 } | 24 } |
25 console.log(properties[i] + ': ' + serialized); | 25 console.log(properties[i] + ': ' + serialized); |
26 } | 26 } |
27 } | 27 } |
28 }); | 28 }); |
29 `; | 29 `; |
30 } | 30 } |
OLD | NEW |