wrapper of window.onload