Freigeben über


New Release of LABjs Script Loader. Improved Chaining Support, Feature detection, DEBUG mode and more.

Great news! Kyle Simpson, author of the highly popular and useful LABjs dynamic script loader, just tweeted out that he's released LABjs 2.0! Of course, I had a quick chat with him so he could give me the lowdown on the new release:

LABjs 2.0 is a full rewrite, emphasizing standardized and future thinking feature tests instead of hacks, readable source code, and several helpful new features. LABjs 2.0's goal is to be both a complete loader solution itself, as well as the building block for a variety of more complex dependency management solutions.

Cool new features include:

  • script() calls in the chain allow you to define one or more scripts to load in parallel
  • wait() calls in the chain allow you to express where execution order needs to wait to preserve dependency execution.
  • LABjs now uses standardized and future-thinking feature tests for preloading and ordered-execution loading, de-emphasizing hacky techniques like cache preloading (now only used in older legacy browsers).
  • The source code is vastly cleaner, and well commented
  • v2.0 is backwards-compatible for its API
  • Many bugs/quirks, including weirdness with "AllowDuplicates" and chain resumption, have been completely fixed
  • New features include "debug mode", built-in queueing, cache-busting, sandbox(), and noConflict()

You can check out the release notes for full details and nab a copy of the latest version here.