Use xhr.onload / onerror instead.