Add an event listener on window resized.