I have an error logging function along with a call to an undefined variable t:
const errortext = document.getElementById("errortext");
window.addEventListener("error", function (msg, file_loc, line_no) {
errortext.innerHTML += msg + " " + file_loc + " " + line_no;
});
t
It fires, but errortext is this:
[object ErrorEvent] undefined undefined
My question is, why arguments are not being passed, and what can I do to fix it?