yes, using document.loaded.

Try something like:

document.loaded ? callback() : document.observe('dom:loaded',



On Jun 24, 11:53 pm, jrochkind <> wrote:
> So prototype 1.6 lets you register an event handler for the psuedo-
> event dom:loaded. Good enough.
> But if you register a callback for this event AFTER it's already
> happened anywhere, it'll never get called (or possibly even something
> stranger will happen, something strange was happening to me, but could
> have been my code).
> I have some re-useable code that sometimes might get called before
> dom:loaded (in which case it wants to register a callback to do it's
> thing on dom:onload), but sometimes might get called after dom:loaded
> (in which case it would just go ahead and do it's thing).
> Is there any way to tell if dom:loaded has happened yet?
You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to