Mercurial > hg > webaudioevaluationtool
changeset 2667:2f2aaef246af
Tighten of code around submission for Safari 8. #190
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Mon, 20 Mar 2017 16:21:44 +0000 |
parents | ad57c5c755d4 |
children | ea1129b0f68f a513533565cf 4125da39666e 56e72cd18404 |
files | js/core.js |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/js/core.js Fri Mar 17 11:24:17 2017 +0000 +++ b/js/core.js Mon Mar 20 16:21:44 2017 +0000 @@ -430,11 +430,11 @@ } else { var parser = new DOMParser(); var xmlDoc = parser.parseFromString(xmlhttp.responseText, "application/xml"); - var response = xmlDoc.firstElementChild; - if (response.nodeName == "response" && response.getAttribute("state") == "OK") { + var response = xmlDoc.getElementsByTagName('response')[0]; + if (response.getAttribute("state") == "OK") { window.onbeforeunload = undefined; var file = response.getElementsByTagName("file")[0]; - console.log("Save: OK, written " + file.getAttribute("bytes") + "B"); + console.log("Intermediate save: OK, written " + file.getAttribute("bytes") + "B"); if (typeof specification.returnURL == "string" && specification.returnURL.length > 0) { window.location = specification.returnURL; } else {