Safari Issue: Unable to dispatch Window load and unload events Bug 19468

Both Firefox 2/3 and Opera 9.26 are able to dispatch load and unload events on the Window. In Safari 3.1.1, however, there exists no function window.dispatchEvent(). I attempted a workaround by creating and initializing load and unload events which bubble (they are specified not to bubble) and then dispatching these on the documentElement with the hope that they would bubble up to the Window, and this does work, but only for unload events. In Safari there is no way to fire Window load events unless the traditional event model is employed and window.onload() is envoked. It would seem that Safari's behavior should be brought into line with Firefox and Opera's.

The load events should flash the background color green, and the unload events should flash it red


Weston Ruter, Shepherd Interactive
June 2008