Nothin' here right now except a pile of links.
On Closures and Leaks
XMLHttpRequest
Event Emulation
It is possible to generate a "fake" click event in W3C compliant browsers by using the following snippet of javascript code:
var clickevent = document.createEvent("MouseEvents");
clickevent.initEvent("click", true, true);
document.getElementById("targetElement").dispatchEvent(clickevent);
The Mozilla Developer Center has an excellent demonstration of creating and dispatching events.
Better Onload
The typical approach for performing post-rendering javascript routines is to register a callback function with the window.onload event. However, in high performance web applications, this can be problematic since this event fires long after the DOM has been loaded and in a ready state for manipulation. A better approach is to use the DOMContentLoaded event.