Nits: per convention, use *let* to declare variables; replace *Components.classes* with its shortcut *Cc*; place the member operator (i.e. the dot) at the end of the previous line rather than the beginning of the next one when breaking a member reference across lines; and align the member reference in the second line with its referent in the first one, i.e.:

```
    let httpreq = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
                  createInstance();
```

Finally, I'm not sure *httpreq* is the best name for this variable, since it isn't necessarily an HTTP request (at the very least, it could also be HTTPS; and the function parameter just takes a generic URL). I would call it simply *request* or *req*.