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();
For using XMLHttpRequest constructor you should add the XPCOM component constructor:
const XMLHttpRequest = Components.Constructor("@mozilla.org/xmlextras/xmlhttprequest;1", "nsIXMLHttpRequest");
and after:
// some code var req = new XMLHttpRequest(); // some code
More info on MDN