Grammalecte  Artifact [7ad6cf391b]

Artifact 7ad6cf391bb1e3d1a793707714f96f06c030c13c140a3954603372da618091da:


// JavaScript

/*
	Events
*/

self.port.on("addElem", function (sHtml) {
	let xElem = document.createElement("p");
	xElem.innerHTML = sHtml;
	document.getElementById("results").appendChild(xElem);
});

self.port.on("clear", function () {
	document.getElementById("results").textContent = "";
});

document.getElementById('testall').addEventListener("click", function (event) {
	self.port.emit('allGCTests');
});

document.getElementById('parse').addEventListener("click", function (event) {
	self.port.emit('checkText', document.getElementById('text').value);
});

document.getElementById('close').addEventListener("click", function (event) {
    self.port.emit('closePanel');
});


/*
	Actions
*/