changeset 1445:dd4fed6a03f2

On XML parser error, will clear the page to show only the error message.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Fri, 18 Dec 2015 18:33:08 +0000
parents 5590afd89544
children 7831cfdc4cca
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]);