yes, using document.loaded.

Try something like:

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

Best,

Tobie

On Jun 24, 11:53 pm, jrochkind <rochk...@jhu.edu> 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 & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to