Async Library Script Loading Demo

The following demonstrates how a library can be built in which its scripts loaded are all loaded asynchronously (with both async and type=module). These scripts can be wired together so that they always run in the same order regardless of the order in which the scripts were downloaded from the network. This is the approach taken by scripts loaded for AMP project. It's also commonly seen in the Google Analytics Async Tracking Code.

Loading...

@westonruter