Closed CanRau closed 8 years ago
Toast was not designed to load other things than js
or css
, which is detecting by parsing the filename of the resource to load. I think I can find a way of specifying the type of the resource when toast cannot detect it (like a google font). Maybe :
toast('[css]https://fonts.googleapis.com/css?family=Open+Sans');
edit : if your code worked before the release, that was a bug by itself :p
I never tried it before, till now I only used toast to load a polyfill if modernizr says it's needed ;-)
That would be great :D
This is fixed with the upcoming release. You'll be able to update in 15 minutes ;)
Wow that was fast! Thank you :dancers:
EDIT: That was the fastest support ever! And it just works :)
Hey, just wanted to load a google webfont using toast but it fails Error
Uncaught TypeError: Cannot read property '1' of null
which refers to this lineb=/(^.+\.\w+)(\?.*)?$/.exec(resource)[1];
Normally I used loadCSS from FilamentGroup but in this project I'm already using toast so why including two resource loaders.. I haven't actually looked into the source in this case and only tested with the webfont so maybe external sources are working in general..
Would love to use toast for loading the font asynchronously :+1: :D
Cheers