Fix translation breakage in Firefox 45
"new" now required before XMLHttpRequest() in chrome code
This commit is contained in:
parent
5a11777587
commit
685954a487
1 changed files with 1 additions and 1 deletions
|
@ -405,7 +405,7 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
|
||||||
var wrappedObj = obj.wrappedJSObject || obj;
|
var wrappedObj = obj.wrappedJSObject || obj;
|
||||||
wrappedObj.__exposedProps__ = {"parseFromString":"r"};
|
wrappedObj.__exposedProps__ = {"parseFromString":"r"};
|
||||||
wrappedObj.parseFromString = function(str, contentType) {
|
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.open("GET", "data:"+contentType+";charset=utf-8,"+encodeURIComponent(str), false);
|
||||||
xhr.send();
|
xhr.send();
|
||||||
if (!xhr.responseXML) throw new Error("error parsing XML");
|
if (!xhr.responseXML) throw new Error("error parsing XML");
|
||||||
|
|
Loading…
Reference in a new issue