comparison test_create/test_core.js @ 2913:b7347521a226

Fix Firefox not downloading new test_create pages
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Tue, 01 Aug 2017 14:13:07 +0100
parents 7b6cdd27f3ee
children 325940450125
comparison
equal deleted inserted replaced
2912:7b6cdd27f3ee 2913:b7347521a226
119 var bb = new Blob([s.serializeToString(doc)], { 119 var bb = new Blob([s.serializeToString(doc)], {
120 type: 'application/xml' 120 type: 'application/xml'
121 }); 121 });
122 var dnlk = window.URL.createObjectURL(bb); 122 var dnlk = window.URL.createObjectURL(bb);
123 var a = document.createElement("a"); 123 var a = document.createElement("a");
124 document.body.appendChild(a)
124 a.href = dnlk; 125 a.href = dnlk;
125 a.download = "test.xml"; 126 a.download = "test.xml";
126 a.click(); 127 a.click();
127 window.URL.revokeObjectURL(dnlk); 128 window.URL.revokeObjectURL(dnlk);
129 document.body.removeChild(a);
128 }; 130 };
129 $s.validated = false; 131 $s.validated = false;
130 $s.showValidationMessages = false; 132 $s.showValidationMessages = false;
131 $s.validate = function () { 133 $s.validate = function () {
132 var s = new XMLSerializer(); 134 var s = new XMLSerializer();