Hi, I''ve trying to add 2 observers to window load event, one that depends of first, because it creates a div dinamicaly. The problem is that in Firefox the observers are a FIFO and in Ie6 they are FILO, so if I make one first than other, it fails in one of browsers. So, there is any way to controll the order of the observers? Greets. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Very good question. As far as I know, there isn''t, but the limits of my knowledge are significant and it''ll be fun to be proved wrong. :-) Assuming there isn''t, though... I''m assuming you''re not in control of both of the handlers, because if you were, you could just have the first one call the second one when it''s done its bit. I''m also assuming you''re in control of the second handler. You could have it check for its dependency (e.g., the div) and, if not found, set up a call back to itself to try again via window.setTimeout... FWIW -- T.J. Crowder tj / crowder software / com On Mar 25, 2:40 pm, kNo <lin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > I''ve trying to add 2 observers to window load event, one that depends > of first, because it creates a div dinamicaly. > The problem is that in Firefox the observers are a FIFO and in Ie6 > they are FILO, so if I make one first than other, it fails in one of > browsers. > So, there is any way to controll the order of the observers? > > Greets.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Yep, known problem: http://dev.rubyonrails.org/ticket/11344 http://dev.rubyonrails.org/ticket/9394 - kangax On Mar 25, 11:34 am, "T.J. Crowder" <tjcrow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Very good question. As far as I know, there isn''t, but the limits of > my knowledge are significant and it''ll be fun to be proved wrong. :-) > > Assuming there isn''t, though... I''m assuming you''re not in control of > both of the handlers, because if you were, you could just have the > first one call the second one when it''s done its bit. I''m also > assuming you''re in control of the second handler. You could have it > check for its dependency (e.g., the div) and, if not found, set up a > call back to itself to try again via window.setTimeout... > > FWIW > -- > T.J. Crowder > tj / crowder software / com > > On Mar 25, 2:40 pm, kNo <lin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > I''ve trying to add 2 observers to window load event, one that depends > > of first, because it creates a div dinamicaly. > > The problem is that in Firefox the observers are a FIFO and in Ie6 > > they are FILO, so if I make one first than other, it fails in one of > > browsers. > > So, there is any way to controll the order of the observers? > > > Greets.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
It would require removing reliance of the dom observers to a single observer for each element and having it fire the events from an array EOMB (Every other modern browser) executes the observers first in first out, IE does it last in first out. An example of how you can enforce a first in first out Basically you assign 1 observer that then executes a list of similar observers. http://pastie.caboo.se/170559 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---