Handle window resize event when embedded.