comparison js/core.js @ 2977:cbd65226e069

#262 debug confirms
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Fri, 12 Jan 2018 13:38:59 +0000
parents f2f0402a1e23
children 7483f1bae6e1
comparison
equal deleted inserted replaced
2976:f2f0402a1e23 2977:cbd65226e069
3660 var hold = document.createElement("div"); 3660 var hold = document.createElement("div");
3661 var clone = parent.root.cloneNode(true); 3661 var clone = parent.root.cloneNode(true);
3662 hold.appendChild(clone); 3662 hold.appendChild(clone);
3663 return new Promise(function (resolve, reject) { 3663 return new Promise(function (resolve, reject) {
3664 // Do the usual XHR stuff 3664 // Do the usual XHR stuff
3665 console.log("Requested save...");
3665 var req = new XMLHttpRequest(); 3666 var req = new XMLHttpRequest();
3666 req.open("POST", returnURL + "php/save.php?key=" + sessionKey + "&saveFilenamePrefix=" + parent.filenamePrefix); 3667 req.open("POST", returnURL + "php/save.php?key=" + sessionKey + "&saveFilenamePrefix=" + parent.filenamePrefix);
3667 req.setRequestHeader('Content-Type', 'text/xml'); 3668 req.setRequestHeader('Content-Type', 'text/xml');
3668 3669
3669 req.onload = function () { 3670 req.onload = function () {
3776 "value": function () { 3777 "value": function () {
3777 if (this.key == null || requestChains === undefined) { 3778 if (this.key == null || requestChains === undefined) {
3778 throw ("Cannot save as key == null"); 3779 throw ("Cannot save as key == null");
3779 } 3780 }
3780 this.parent.root.setAttribute("state", "update"); 3781 this.parent.root.setAttribute("state", "update");
3781 console.log("Requested save...");
3782 requestChains = requestChains.then(postUpdate()); 3782 requestChains = requestChains.then(postUpdate());
3783 } 3783 }
3784 }, 3784 },
3785 "finish": { 3785 "finish": {
3786 "value": function () { 3786 "value": function () {