LABjs (Loading And Blocking JavaScript) is an open-source (MIT license) project supported by Getify Solutions. The core purpose of LABjs is to be an all-purpose, on-demand JavaScript loader, capable of loading any JavaScript resource, from any location, into any page, at any time.
Questions tagged [labjs]
55 questions
34
votes
5 answers
Can script.readyState be trusted to detect the end of dynamic script loading?
I use dynamic script loading to reduce the duration of the initial page load. To ensure that the functions and objects defined by a script are accessible, I need to ensure that the script has been fully loaded.
I have developed my own Javascript…

Eric Bréchemier
- 1,908
- 3
- 18
- 30
14
votes
5 answers
loading js files and other dependent js files asynchronously
I'm looking for a clean way to asynchronously load the following types of javascript files: a "core" js file (hmm, let's just call it, oh i don't know, "jquery!" haha), x number of js files that are dependent on the "core" js file being loaded, and…

taber
- 3,166
- 4
- 46
- 72
13
votes
1 answer
jQuery UI API failing to load properly with LABjs
I've recently switched to using LABjs to load scripts in SharePoint Webparts (2010). The main reason for this was to avoid loading the same library (like jquery and jquery.ui) to the page more than once if multiple Webparts were added to the same…

LdTrigger
- 143
- 1
- 8
6
votes
2 answers
Multiple conditions with yepnope
I use yepnope.js as a resource loaded. I want to execute code in my JS module only when all the dependencies for that module have been loaded. I do not want to load JS dependencies that already been loaded.
Suppose, I have dependencies D1.js and…

user1044169
- 2,686
- 6
- 35
- 64
5
votes
1 answer
Alternatives to YepNope and LabJS
I am wanting to load javascript and css files via a resource loader. I was originally using LabJs but I found YepNope more elegant and easier to work with in my scenario. However I am finding it devastatingly slow, which is odd as apparently it is…

Grofit
- 17,693
- 24
- 96
- 176
5
votes
3 answers
How to use a JavaScript loader like head.js or labjs in Magento
Off the bat Magento comes with more than half a dozen JavaScript libraries which do not help with the already cumbersome load times. Has anybody been able to successfully use a script loader like head.js or labjs with Magento so that they can load…

Matthew Dolman
- 1,732
- 7
- 25
- 49
5
votes
2 answers
Does Labjs postpone the execution of the loaded scripts til the DOM is ready?
The question is regarding the http://labjs.com – an awesome library for non-blocking JavaScript loading and dependencies managing.
I've read the docs, but I must be too tired or something – I couldn't find anything regarding DOM ready event. Are…

Misha Reyzlin
- 13,736
- 4
- 54
- 63
5
votes
2 answers
ExtJs dependency management using RequireJS, LABjs (or similar)
I am trying to find examples of how to wrap ExtJs and ExtJs 'modules' up for use with a javascript dependency framework such as RequireJS or LAB.
I am working with a large ExtJs based project and there are many separate module files which are just…

David
- 8,340
- 7
- 49
- 71
4
votes
2 answers
LabJs or HeadJS?
Looking for any advice on experiences between these two javascript loaders ?
head.js('some-script-here.js');
Or
$LAB.script("framework.js").wait();
Can anyone provide any guidance on these and whether one is better than another ? I'm struggling to…

Tom
- 49
- 2
4
votes
2 answers
Curl throwing ‘Promise already completed’ error
I’m currently testing various asynchronous-resource-loaders to see which one I want to use. At the moment Curl is throwing a ‘Promise already completed’ error…and their documentation says ‘this should never happen’.
I “suspect” I must to use a…

Prisoner ZERO
- 13,848
- 21
- 92
- 137
4
votes
2 answers
Uncaught Error: [$injector:modulerr] Failed to instantiate module with LABJS
I keep getting this error when loading my Angular app. In Chrome a couple refreshes and my app will run but IE and FF is a no go.
The error links me to this error page but I don't really understand what it says.
I am loading my app using LabsJS…

Batman
- 5,563
- 18
- 79
- 155
4
votes
2 answers
Is a 200ms decrease in page load time significant?
I made a few tests with lab js in one of the sites I've developed and got a reduction of 200ms in the page load time. The total time spent now after backend processing is around 1.5 seconds.
I was wandering if its worth the trouble. Is 200ms a huge…

Marco Luglio
- 3,503
- 1
- 21
- 27
3
votes
4 answers
Is there a known workaround for IE9's execution order of injected script tags?
I am sure I don't fully understand this problem, but it seems that we are seeing strange behavior on IE9 on my project, somehow related to out-of-order execution of JavaScript that has been injected via calls to document.write,…

Dan Tao
- 125,917
- 54
- 300
- 447
3
votes
1 answer
LABjs : How to append the scripts to the end of the body tag
I have used queueScript to append the scripts. But they are appended in the tag. I want to append them at the end of the body tag. how do I do it?
var comp;
var _DIR_ = "js/vendor/";
var _BOWER_DIR_ = "bower_components/";
…

Divya Barsode
- 778
- 1
- 5
- 15
2
votes
1 answer
labjs load google analytics
Has anyone used LABjs for loading google analytics?
Where do you include it in the chain?
I found this script but wasn't sure whether to include my other scripts before or after
$LAB
.script("js/myscripts.js")…

fortuneRice
- 4,214
- 11
- 43
- 58