On Apr 13, 6:55 pm, "David J. Burger" <[email protected]> wrote:
> With multiple calls to addDomListener under IE (at least 7 anyway) it
> appears that the callbacks do not occur in the order they are
> defined.  For example:
>
> GEvent.addDomListener(window, "load", function() {
>     alert("hello 0");
>
> });
>
> GEvent.addDomListener(window, "load", function() {
>     alert("hello 1");
>
> });
>
> GEvent.addDomListener(window, "load", function() {
>     alert("hello 2");
>
> });
>
> GEvent.addDomListener(window, "load", function() {
>     alert("hello 3");
>
> });
>
> Under Firefox the callbacks will occur in the order defined, under
> Internet Explorer the callbacks occur in the order: 1, 3, 2, 0
>
> I understand that Internet Explorer does not follow the w3c standard
> for events and likely uses some kind of event chaining to do the
> multiple callbacks.  Couldn't the implementation for Internet Exploder
> be written so that it calls them in order?  Is there hack to get it to
> callback in the right order given the current implementation?

1. Why should Google complicate the API more than necessary to work
around IE's weirdnesses?  Particularly since it is probably different
for different versions of IE.

2. Why don't you just put them in the order you want?


GEvent.addDomListener(window, "load", function() {
     function1();
     function2();
     function3();
     ...
});

or search for "multiple onload functions"
http://groups.google.com/group/Google-Maps-API/search?group=Google-Maps-API&q=multiple+onload+functions&qt_g=Search+this+group

  -- Larry


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to