Chapter 10Libraries

JavaScript has been around for 18 years. In all that time, it still lacks a simple library loading mechanism. This is not for lack of need. There are many independent solutions and even several attempts at standards (commonjs, AMD, and ECMAscript harmony modules).[14][15][16] As these standards have languished in various states of usefulness and adoption, the community has generated more loader plugins than can be counted.

Despite all of these efforts, the surest way to load additional JavaScript libraries is via a combination of additional <script> tags and compressing multiple files into a single compressed JavaScript script. Neither solution is without problems (such as load order and deployment complexity).

Mercifully, ...

Get Dart 1 for Everyone now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.