Skip to content
This repository was archived by the owner on Apr 2, 2020. It is now read-only.
This repository was archived by the owner on Apr 2, 2020. It is now read-only.

fallback.ready after WebFont.load #81

Description

@CharlyPoppins

Hi,

I'm trying to avoid FOUC so I use this tips : https://gist.github.com/johnpolacek/3827270

Then I'm trying to display the page ASAP, before heavy scripts are loaded with this code :

fallback.ready(['jQuery', 'WebFont', 'global_css', 'bootstrap'], function () { $('.no-fouc').removeClass('no-fouc'); });

fallback.load({ ... WebFont: [ 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', '{{ asset('bundles/app/libraries/webfont.js') }}' ], ... }, { callback: function (success, failed) { WebFont.load({ google: { families: ['Noticia+Text:400,400italic, } });

Except WebFont's fonts are not yet loaded (as you can see in the code above).
I don't know how to deal with it, how can I trigger code after WebFont.load is completed ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions