ded/script.js

async loading CDD

kofifus opened this issue · 6 comments

As far as I understand script.js does not support CSS files

Wouldn't it be cool to add it ? for example using the code from https://github.com/filamentgroup/loadCSS ?

Thanks!

@kofifus I have an implementation this on my fork of script.js. you can check it out by cloning the repo

use the following code to async-ly load CSS
$script.get("../path/to/css", function(){ alert("all done!"); });

though my implementation is unlike the loadCSS project by @scottjehl

supported even in IE6

kul man, do you have in docs for your fork ? also is there a way in your implementation to know when the CSS finished loading ? thx!

@kofifus i don't have docs available for this implementation. I may just have to edit the README.md file a little in the comming days to give brief examples. there is a second argument to the get llback to detect when you are done loading CSS

Any news on this? I'd also be happy to see CSS loading in script.js!