Is it possible to test whether the window has been loaded or not? I
have a script.js that anyone can use. Some people will put it in the
head tag, so this script will be run before Window has been loaded.
Other people might do something crazier like only load script.js when
someone clicks a button. To make script.js work for all kinds of
people, I wanted it to be something like this psuedo-code:
if (window.isLoaded()) {
init();
} else {
new Event.observe(window, 'load', function() { init(); });
}
Is there an actual way to test if Window is loaded?
--
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 [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-scriptaculous?hl=en.