modify resize event, free window.onresize.