Mercurial > hg > webaudioevaluationtool
changeset 808:cff21eb2c053
On XML parser error, will clear the page to show only the error message.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 18 Dec 2015 18:33:08 +0000 |
parents | 8540d153caec |
children | ce7ccabbd34f |
files | core.js |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core.js Fri Dec 18 18:31:26 2015 +0000 +++ b/core.js Fri Dec 18 18:33:08 2015 +0000 @@ -73,6 +73,7 @@ msg.textContent = "FATAL ERROR"; var span = document.createElement("span"); span.textContent = "The XML parser returned the following errors when decoding your XML file"; + document.getElementsByTagName('body')[0].innerHTML = null; document.getElementsByTagName('body')[0].appendChild(msg); document.getElementsByTagName('body')[0].appendChild(span); document.getElementsByTagName('body')[0].appendChild(errorNode[0]);