Release Notes

2.0.3

Fixed Bug #43 regression bug in IE<=8.

2.0.2

Fixed Bug #36 about race conditions with `.wait(...)` callbacks.

Fixed Bug #38 about incorrect handling of array parameters to `.script(...)` calls.

2.0.1

Fixed Bug #35 affecting IE6 and IE7 regarding path handling.

2.0

This is a complete ground-up rewrite of LABjs. The API is backwards-compatible (except for a few configuration options being removed). Many bugs were fixed and several new features were added.

1.2.0:

Browsers have long supported "protocol-relative URLs", which basically means leaving off the "http:" or "https:" portion of a URL (leaving just the "//domain.tld/path/..." part), which causes that URL to be assumed to be the same protocol as the parent page. The benefit is that if you have a page that can be viewed in either HTTP or HTTPS, and your resources can (and need to be) served through either HTTP or HTTPS, respectively, you can simply list your URLs as protocol-relative and the browser will auto-select based on which protocol the page is viewed in.

LABjs now supports specifying such URLs to any script URL setting. NOTE: This is the recommended way to specify URLs for script resources if: a) the page you're serving can be viewed in both HTTP and HTTPS; and b) the script resource you're linking to can be accessed using the exact same domain/path with exception to the protocol.

A common example of such a resource is the CDN locations on the Google Ajax API, where popular frameworks like jQuery and Dojo are hosted. If you are linking to such CDN resources, you are strongly encouraged to change to using protocol-relative URLs, like "//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" instead of "http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" or "https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js".

1.1.12:
Fixed a minor (but long standing) bug around sections of the $LAB chain that are "empty" (that is, have nothing to load) not properly forwarding on the loading/execution cursor to the next section of the chain. This also corrects a failure in the previously released (in v1.1.11) functionality of conditional chaining with no-op functions in .script() calls.

1.1.11:
Adding one new feature: the ability to pass a function to a .script() call. If a function is found as one of the parameters evaluated by .script(), that function will be immediately executed, and the value that it returns will be used as the value for that parameter. This allows you to specify "conditional chains" where you use run-time conditional logic to decide which script should be loaded. See the Documentation for more information.

1.1.0-1.1.10:
These versions of LABjs were ghost versions that never saw the light of day. Or I just skipped them. I can't remember which.

1.0.4:
LABjs is broken in FF 4b7 related to changes in dynamic script execution ordering behavior. The new (informal) proposal to the W3C is to support `async=false` functionality, which FF 4b8pre took the lead in implementing. So this release implements a feature test for `async=false` and uses it.

1.0.3:
Fixed a bug where LABjs wasn't working in FF4 because of the removal of __count__ property which LABjs used as a Gecko inference. Also, cleaned up some code.

1.0.2rc1:
A number of tweaks and minor bug fixes. No more use of "rel" attributes on preload script tags. Changed the mimetype for preload script tags to "script/cache" (from "text/html"). Uses "insertBefore()" when adding scripts to the <head> to avoid possible bugs in IE6. Also, fixes use of live node lists to prevent bugs with IE where the list is invalidated after the DOM is changed.

1.0.1:
You knew there had to be an obligatory, right-after-release, oops-crap-i-just-found-a-bug, patch. This is that patch. Fixes a corner case error where if you happen to end your chain with just a script() statement and no wait() statement, the end of the chain is never detected (which causes the final script to never execute!).

1.0:
Final production release. 4.5k minified, 2.1k gzip'd. Have fun!

1.0rc5:
More optimizations for file-size. Also, changed XHR monitoring from setInterval() polling to a "onreadystatechange" handler.

1.0rc4:
Added a "hack" suggested by Andrea Giammarchi and adapted from: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html NOTE: this hack only operates in FF and then only in versions where document.readyState is not present (FF < 3.6?).

The hack essentially "patches" the page that LABjs is loaded onto so that it has a proper conforming document.readyState, so that if a script which does proper and safe dom-ready detection is loaded onto a page, after dom-ready has passed, it will still be able to detect this state, by inspecting the now hacked document.readyState property. The loaded script in question can then immediately trigger any queued code executions that were waiting for the DOM to be ready. For instance, jQuery > 1.3.2 has been patched to take advantage of document.readyState, which is enabled by this hack. But 1.3.2 and before are **not** safe or affected by this hack, and should therefore **not** be lazy-loaded by script loader tools such as LABjs.

1.0rc3:
More tweaks to reduce file-size and improve performance. Also, fLABjs is now included, which is a special API wrapper for usage of LABjs in file:// local filesystem environments. Source on github here.

1.0rc2:
Tweaks for performance, changes to browser sniffing "hacks".

1.0rc1:
Huge reworking, adding the new "preloading" feature, new API. Documentation Coming Soon!

0.9:
Further improvements to code, including smaller size (2.1k now!), and more efficient run-time execution.