fix: report user code evaluation errors

Errors thrown during evaluation of the user's code will now be reported.

JavaScript challenges will only report to the browser console and only
during testing.

DOM challenges will report to the browser console during testing and as
the user types, but only report to the fcc console during testing
pull/37689/head
Oliver Eyton-Williams 2019-11-01 09:15:42 +01:00 committed by mrugesh
parent 5059d23600
commit 6acab90cb6
1 changed files with 1 additions and 0 deletions

View File

@ -22,6 +22,7 @@ const createHeader = (id = mainId) => `
window.__frameId = '${id}';
window.onerror = function(msg, url, ln, col, err) {
window.__err = err;
console.log(msg);
return true;
};
document.addEventListener('click', function(e) {