domready & labJS

3 views
Skip to first unread message

eskimoblood

unread,
Nov 23, 2009, 9:15:53 AM11/23/09
to MooTools Users
I'm trying to use mootools with labJS (http://labjs.com). Using wait()
and domready fails some times. It seems that on adding the event there
is no check if the dom is still ready, or what is the problem here.

<script type="text/javascript" src="../js/LAB.js"></script>
<script type="text/javascript">
$LAB
.script("http://exeter:8080/web3CI/js/mootools-1.2.4-core.js")
.wait(function(){
window.addEvent('domready', function(){
alert('test')
})
});
</script>

nwhite

unread,
Nov 23, 2009, 10:56:51 AM11/23/09
to mootool...@googlegroups.com

From the site:

Bottom line: only the few special scripts out there, like libraries, that do their own DOM-ready detection, and don't do so in a dynamically-loaded-after-page-load safe way, will have possible problems if loaded by LABjs, so avoid it only in those rare cases. Simply load those special scripts with a manual script tag like always before. In all other cases, including your plugins which rely on that logic working correctly, LABjs is perfectly safe and good to use!

I would change your code to use their suggestion.

eskimoblood

unread,
Nov 23, 2009, 11:54:09 AM11/23/09
to MooTools Users
I've read this but I hoped there was a way to get it work. Btw whats
so difficult to check if domready is still happened?

On 23 Nov., 16:56, nwhite <changereal...@gmail.com> wrote:
> From the site:
> Bottom line: *only* the few special scripts out there, like libraries, that
> do their own DOM-ready detection, and don't do so in a
> dynamically-loaded-after-page-load safe way, will have possible problems if
> loaded by LABjs, so avoid it *only* in those rare cases. Simply load those
> special scripts with a manual script tag like always before. In all other
> cases, including your plugins which rely on that logic working
> correctly, *LABjs
> is perfectly safe and good to use*!
Reply all
Reply to author
Forward
0 new messages