windowhandler.js has globally scoped functions and does not chain window.onload

Details

Description

After fixing a minor issue in the windowhandler.js codebase I saw that the windowhandler.js file has globally scoped functions and does not chain window.onload but instead overwrites it.
The commit in this issue will wrap all functions of the window handler into an outer function and marks then thus as private.
Also a simple window onload chain is added.