Sha256: bb303f59a0dcaf5b952e20b0153e6a569d307cc2e69d3814872d9e39c912d923
Contents?: true
Size: 990 Bytes
Versions: 2
Compression:
Stored size: 990 Bytes
Contents
/** * * WebFont.load({ * custom: { * families: ['Font1', 'Font2'], * urls: [ 'http://moo', 'http://meuh' ] } * }); * * @constructor */ webfont.CustomCss = function(domHelper, configuration) { this.domHelper_ = domHelper; this.configuration_ = configuration; }; webfont.CustomCss.NAME = 'custom'; webfont.CustomCss.prototype.load = function(onReady) { var urls = this.configuration_['urls'] || []; var families = this.configuration_['families'] || []; for (var i = 0, len = urls.length; i < len; i++) { var url = urls[i]; this.domHelper_.insertInto('head', this.domHelper_.createCssLink(url)); } onReady(families); }; webfont.CustomCss.prototype.supportUserAgent = function(userAgent, support) { return support(userAgent.isSupportingWebFont()); }; globalNamespaceObject.addModule(webfont.CustomCss.NAME, function(configuration) { var domHelper = new webfont.DomHelper(document); return new webfont.CustomCss(domHelper, configuration); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
webfontloader-1.0.31 | src/custom/customcss.js |
webfontloader-1.0.30 | src/custom/customcss.js |