Having prototype simulate the DOMContentReady event for those browsers that don't support it is wonderful, however, what is the plan for calling late registrants?
For example, imagine you have a widget which would like to perform its initialisation only after the DOM is ready. It registers a listener for contentready on the document. All is fine. Now let's add Ajax to the mix. The widget is instantiated via content injected via Ajax. The registration for contentready will never be called. The solution I've been using is based on someone's Event.onDOMReady code: if the event has already been fired, I call the listener after a brief delay (to maintain the implicit contract "call this function later") via window.setTimeout(fn, 0). Am I missing something critical about the implementation of the synthesised contentready event? On the other hand, maybe contentready isn't the right answer here, because when browsers _really_ support DOMContentReady, it won't do what I want anyway. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---
