I am writing a FireFox-Extension and want to load Data from Server. But when I try to initialize the XMLHttpRequest with:
var request = new XMLHttpRequest();
The error console says:
ReferenceError: XMLHttpRequest is not defined
Do I have to include something or why the XMLTttpRequest is not recognized?
The Add-on SDK (that you are using indirectly via the Add-on Builder) provides a
requestpackage that is essentially a wrapper aroundXMLHttpRequest, you should use it. From what I understand, you aren’t given directXMLHttpRequestaccess to prevent issues if the add-on is uninstalled/disabled while a request is being performed.