Thanks for the reply Larry:

For 1., it would just involve Google adding a new function to the
callback list in the right order.  It wouldn't complicate the external
API, but you are right it there might be some bad details in the
implementation with multiple versions of IE.

For 2., of course I can fix my code to use one callback, but as the
code is now the callbacks are in different files as the general
setting up of the map has been extracted out into its own callback
with page specific setup in another callback.  The page specific
callback must occur after the map setup.

So yes I will be uglifying my code to get it to work around IE's
weirdness - thanks

On Apr 13, 4:11 pm, "[email protected]" <[email protected]>
wrote:
> 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-Ma...
>
>   -- 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