You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// Generated by CoffeeScript 1.6.2
var ElementsCollection, StylesCollection, typeChecker, _ref, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
typeChecker = require('typechecker');
ElementsCollection = require(__dirname + '/elements');
StylesCollection = (function(_super) { __extends(StylesCollection, _super);
function StylesCollection() { _ref = StylesCollection.__super__.constructor.apply(this, arguments); return _ref; }
StylesCollection.prototype.add = function(values, opts) { var key, value, _i, _len;
opts || (opts = {}); opts.attrs || (opts.attrs = ''); if (typeChecker.isArray(values)) { values = values.slice(); } else { values = [values]; } for (key = _i = 0, _len = values.length; _i < _len; key = ++_i) { value = values[key]; if (typeChecker.isString(value) && /^\</.test(value) === false) { values[key] = "<link " + opts.attrs + " rel=\"stylesheet\" href=\"" + value + "\" />"; } } return StylesCollection.__super__.add.call(this, values, opts); };
return StylesCollection;
})(ElementsCollection);
module.exports = StylesCollection;
|