main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
306 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | exports.addon = function (renderer) {
|
---|
| 4 | var cache = {};
|
---|
| 5 |
|
---|
| 6 | renderer.cache = function (css) {
|
---|
| 7 | if (!css) return '';
|
---|
| 8 |
|
---|
| 9 | var key = renderer.hash(css);
|
---|
| 10 |
|
---|
| 11 | if (!cache[key]) {
|
---|
| 12 | cache[key] = renderer.rule(css, key);
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | return cache[key];
|
---|
| 16 | };
|
---|
| 17 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.