stateless URL evaluation
This commit is contained in:
parent
059a3208b5
commit
e9d4499789
@ -6,14 +6,14 @@ tree.URL = function (val, paths) {
|
||||
val.value = [paths[0], val.value].join('/').replace('//', '/');
|
||||
}
|
||||
this.value = val;
|
||||
this.paths = paths;
|
||||
};
|
||||
tree.URL.prototype = {
|
||||
toCSS: function () {
|
||||
return "url(" + this.value.toCSS() + ")";
|
||||
},
|
||||
eval: function (ctx) {
|
||||
this.value = this.value.eval(ctx);
|
||||
return this;
|
||||
return new(tree.URL)(this.value.eval(ctx), this.paths);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user