在异步模式下使用webfontloader时,不会触发活动和非活动事件日志。我错过了一些明显的东西吗?
https://github.com/typekit/webfontloader
//async loads fonts
WebFontConfig = {
typekit : { id: 'XXXXXXX' },
loading: function() {
console.log('loading');
},
active: function() {
console.log('active');
},
inactive: function() {
console.log('inactive');
}
};
(function(d) {
var wf = d.createElement('script'), s = d.scripts[0];
wf.src = '//ajax.googleapis.com/ajax/libs/webfont/1.5.6/webfont.js';
s.parentNode.insertBefore(wf, s);
})(document);