4 ms·
FastInit: a faster window.onload
I found this nice JavaScript class few months ago. Thought I would share it... The class implements a kind of onload function queue. This will ensure that your initialization function(s) are called once the browser DOM is ready and not have to wait for all the images.
- DanielBMarkham 19y agoThis is one of those pieces of code that has been done a dozen different ways (probably hundreds, even). I like this implementation though. Nice and clean and short and sweet.