webfontloader活动和非活动事件日志未触发

时间:2015-05-28 15:29:56

标签: jquery webfonts typekit

在异步模式下使用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);

0 个答案:

没有答案