3 tree.URL = function (val, paths) {
7 // Add the base path if the URL is relative and we are in the browser
8 if (!/^(?:https?:\/|file:\/|data:\/)?\//.test(val.value) && paths.length > 0 && typeof(window) !== 'undefined') {
9 val.value = paths[0] + (val.value.charAt(0) === '/' ? val.value.slice(1) : val.value);
15 tree.URL.prototype = {
17 return "url(" + (this.attrs ? 'data:' + this.attrs.mime + this.attrs.charset + this.attrs.base64 + this.attrs.data
18 : this.value.toCSS()) + ")";
20 eval: function (ctx) {
21 return this.attrs ? this : new(tree.URL)(this.value.eval(ctx), this.paths);
25 })(require('less/tree'));