News for hackers. Stuff that matters.
Re:LoadJS – A tiny async loader for modern browsers (710 bytes) by Exuma on Wednesday December 14, 2016 @02:58AM (#13174526)
That's cool. Would this help with my page speed score that almost is always like a D- for stuff related to async/css/js and 'deferred' loading?
Re:LoadJS – A tiny async loader for modern browsers (710 bytes) by helb on Wednesday December 14, 2016 @06:48AM (#13175303)
Maybe, but you can make it better even without any fancy loaders, async and defer are regular attributes of the script tag – https://developer.mozilla.org/en/docs/Web/HTML/Element/scrip...
Re:LoadJS – A tiny async loader for modern browsers (710 bytes) by Flimm on Wednesday December 14, 2016 @08:17AM (#13175708)
`defer` has problems: http://stackoverflow.com/a/40535440/247696

There is no obvious easy way to wait for an `async` script to finish loading and executing before running code that depends on it. For instance, how would I load the jQuery library asynchronously before running code that depends on jQuery?