Pass window.location.href instead.