Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
getify edited this page Sep 13, 2010 · 3 revisions

fLABjs is a special API wrapper around LABjs which adapts the code to work properly in a file:// local filesystem environment. There are a number of things with core LABjs does which are not appropriate for local filesystems, such as XHR, special path handling rules, etc.

fLABjs is specifically designed to be included in a page and only operate when that page is viewed with file:// protocol. However, your build/deployment system should not send fLAB.js out into production http/https page usage as it’s unnecessary page weight and keeps itself disabled in those usages anyway.

Using fLABjs from an API standpoint is exactly identical to LABjs, so your code will not have to change at all.

Simply include the fLAB.js file right after the LAB.js file in your page, and the API will properly and transparently wrap itself to make your local file:// usage work correctly.

Example:

<script src=“LAB.js” type=“text/javascript”></script>
<script src=“fLAB.js” type=“text/javascript”></script> <!— only include in dev environment —>
<script type=“text/javascript”>
$LAB
.setOptions({…})
.script(…)
.wait(…);
</script>

Clone this wiki locally