you can use xhr.onload, this should not trigger before we have xhr.readyState === xhr.DONE