nit: to simplify, you can use `req.onload`

see https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIXMLHttpRequestEventTarget