Fix translation breakage in Firefox 45

"new" now required before XMLHttpRequest() in chrome code
This commit is contained in:
Dan Stillman 2016-03-05 01:51:28 -05:00
parent 5a11777587
commit 685954a487

View file

@ -405,7 +405,7 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
var wrappedObj = obj.wrappedJSObject || obj;
wrappedObj.__exposedProps__ = {"parseFromString":"r"};
wrappedObj.parseFromString = function(str, contentType) {
var xhr = sandbox.XMLHttpRequest();
var xhr = new sandbox.XMLHttpRequest();
xhr.open("GET", "data:"+contentType+";charset=utf-8,"+encodeURIComponent(str), false);
xhr.send();
if (!xhr.responseXML) throw new Error("error parsing XML");