I found a bit of a weird situation (bug)? with addLoadEvent. I have a function that I want to execute synchronously once the page has loaded, doing some fairly minor but important page changes. However, when I attach it using addLoadEvent(myFunction()), code within myFunction can't get to the DOM. (ie: Calls to both MochiKit DOM functions and to getElementById fail.)
When I execute the same function from the html using <body onLoad="myFunction()" >, it works fine and has access to the DOM. Anyway, for now simply calling the function using onLoad is a solution, although it would obviously be better, for future compatibility with other scripts, if I could rather use addLoadEvent. I am using MochiKit 1.3.1 and have tested this on Firefox 2.0.0.3 on Linux. I wasn't sure if this was a bug, or if there was something I just wasn't understanding about how addLoadEvent works, so I posted it here. Anyway, I hope this is useful. Regards, Kieran --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" 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/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---
