kubetail-org / loadjs

A tiny async loader / dependency manager for modern browsers (899 bytes)
MIT License
2.58k stars 149 forks source link

Announcement: New version with support for synchronous execution #22

Open amorey opened 8 years ago

amorey commented 8 years ago

Hi Everyone,

The newest version of LoadJS (2.0.0) includes a new API and support for fetching files in parallel and executing them in series via an async: false option:

loadjs(['/path/to/foo.js', '/path/to/bar.js'], {
  success: function() { /* foo.js and bar.js loaded in series */ },
  async: false
});

Please try it out and let us know what you think!

Andres

https://github.com/muicss/loadjs

glucka commented 7 years ago

hi, async: false do not work on IE9

amorey commented 7 years ago

@glucka Thanks for pointing out that IE9 doesn't support async: false. There's a note about this issue in the Browser Support section of the README: https://github.com/muicss/loadjs#browser-support

asos-tomp commented 5 years ago

Unfortunately, any script tags lower down the page that rely on something in an async:false script added using loadjs still appear to have a race condition - i.e. the loadjs-added script does not execute prior to those scripts. This makes the feature less useful.