onunload didn't work with JSeventFunCalls but might be required, for example with Google Maps to fix some memory leaks with IE.
Attached is a patch that adds that feature just like onload:
(issue imported from #M4701)
#5 Updated by Christoph Koehler over 13 years ago
Not sure since both are valid and I am not a JS guy. I use it for Google Maps which requires the onload stuff to be in the body tag. So as long as I can still do that, I am good.
If they are different (couldn't find anything on Google about that), we could just add them as an option instead of including them all the time automatically.
#6 Updated by Oliver Hader over 13 years ago
Have a look how this is implemented in prototype.js event handlers ("_observeAndCache"):