I have two js files, each one with its own window.onload handler. Depending on how I attach the two onload handlers to the window object I get a different behaviour on the s
You need to look at addEventListener and attachEvent, which are native implementations of your addOnloadHandler.
addOnloadHandler