Sha256: b0bbd4cd336c66c2e698fb8a6981837d3d60bf060a3960ead688d92ebf44c03a
Contents?: true
Size: 1.45 KB
Versions: 3
Compression:
Stored size: 1.45 KB
Contents
// Name of the global object. var globalName = 'WebFont'; // Provide an instance of WebFont in the global namespace. window[globalName] = (function() { var userAgentParser = new webfont.UserAgentParser(navigator.userAgent, document); var userAgent = userAgentParser.parse(); var domHelper = new webfont.DomHelper(document); var asyncCall = function(func, timeout) { setTimeout(func, timeout); }; return new webfont.WebFont(domHelper, new webfont.FontModuleLoader(), document.documentElement, asyncCall, userAgent); })(); // Export the public API. window[globalName]['load'] = window[globalName].load; window[globalName]['addModule'] = window[globalName].addModule; // Export the UserAgent API because we pass this object to external modules. webfont.UserAgent.prototype['getName'] = webfont.UserAgent.prototype.getName; webfont.UserAgent.prototype['getVersion'] = webfont.UserAgent.prototype.getVersion; webfont.UserAgent.prototype['getEngine'] = webfont.UserAgent.prototype.getEngine; webfont.UserAgent.prototype['getEngineVersion'] = webfont.UserAgent.prototype.getEngineVersion; webfont.UserAgent.prototype['getPlatform'] = webfont.UserAgent.prototype.getPlatform; webfont.UserAgent.prototype['getPlatformVersion'] = webfont.UserAgent.prototype.getPlatformVersion; webfont.UserAgent.prototype['getDocumentMode'] = webfont.UserAgent.prototype.getDocumentMode; webfont.UserAgent.prototype['isSupportingWebFont'] = webfont.UserAgent.prototype.isSupportingWebFont;
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
webfontloader-1.0.29 | src/core/initialize.js |
webfontloader-1.0.28 | src/core/initialize.js |
webfontloader-1.0.27 | src/core/initialize.js |