Thanks to you all for your help. Aaron, I really enjoyed reading about
your Behaviour class and look forward to using it soon. In fact Philip
Thompson was bang on with observation that I actually do not need the
DOM for what I'm doing.
Basically I have three "levels" of javascript in my app:

1. mootools itself
2. my custom built supporting scripts (e.g. logging utility, history
management)
3. my other scripts that actually do stuff (e.g. a date picker here, a
form validator there)

So long as those three families of scripts load in the right order
then I'm fine.

Where Philips solution fitted for me is that my 2nd family of scripts
(basically just utilities) don't actually manipulate the DOM at all.
Therefore they are safe to execute immediately.

Thanks all!


On Jul 25, 8:12 pm, Aaron Newton <[email protected]> wrote:
> I realize this is off-topic, but you may be interested in Behavior.js which
> aims to remove domready as the place where one initializes most of your
> code. It wouldn't necessarily get rid of all of it, but anything that
> actually depends on the DOM (and hence, in theory, the domready event) can
> be abstracted away. More here:
>
> https://github.com/anutron/behavior
>
> and
>
> http://dev.clientcide.com/(for demos, docs, specs, benchmarks, download,
> etc)
>
>
>
>
>
>
>
> On Mon, Jul 25, 2011 at 8:05 AM, verylastminute <[email protected]> wrote:
> > I presume it needs DOMready because it outputs to a DOM element...

Reply via email to