Fix onerror function in headless mode

Otherwise we don't see any output!
This commit is contained in:
Alex Crichton 2018-07-06 19:36:10 -07:00
parent 3236bac3f6
commit bc01d6cd61

View File

@ -489,7 +489,7 @@ impl Project {
if self.headless {
runjs.push_str("
function onerror(error) {
function onerror(e) {
const errors = document.getElementById('error');
let content = `exception: ${e.message}\\nstack: ${e.stack}`;
errors.innerHTML = `<pre>${content}</pre>`;