{"action":"closed","issue":{"url":"https://api.github.com/repos/zertosh/errorify/issues/1","labels_url":"https://api.github.com/repos/zertosh/errorify/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/zertosh/errorify/issues/1/comments","events_url":"https://api.github.com/repos/zertosh/errorify/issues/1/events","html_url":"https://github.com/zertosh/errorify/issues/1","id":63568448,"number":1,"title":"DOM / CSS","user":{"login":"mattdesl","id":1383811,"avatar_url":"https://avatars.githubusercontent.com/u/1383811?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdesl","html_url":"https://github.com/mattdesl","followers_url":"https://api.github.com/users/mattdesl/followers","following_url":"https://api.github.com/users/mattdesl/following{/other_user}","gists_url":"https://api.github.com/users/mattdesl/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdesl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdesl/subscriptions","organizations_url":"https://api.github.com/users/mattdesl/orgs","repos_url":"https://api.github.com/users/mattdesl/repos","events_url":"https://api.github.com/users/mattdesl/events{/privacy}","received_events_url":"https://api.github.com/users/mattdesl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-22T19:49:57Z","updated_at":"2015-03-23T00:03:39Z","closed_at":"2015-03-23T00:03:39Z","body":"I like the idea of this and would be interested in bringing it into my workflow, but I find Beefy's DOM-based error reporting (using `<pre>`) to be a bit cleaner and less jarring/disruptive than a modal `alert()`. \r\n\r\nThere's also more potential for colors, `err.stack`, etc rather than just a string message. \r\n\r\nAre you open to this? Or would you rather it be in another module?\r\n\r\nA simple template ends up looking like this: (mostly from Beefy)\r\n\r\n```js\r\nfunction(error) {\r\n  console.error(error)\r\n  var doc = typeof document === 'undefined' ? null : document\r\n  if (!doc)\r\n    return\r\n  \r\n  if(!doc.body) {\r\n    return doc.addEventListener('DOMContentLoaded', function() {\r\n      output()\r\n    })\r\n  } else\r\n    output()\r\n  \r\n  function output() {\r\n    var pre = doc.createElement('pre')\r\n    pre.textContent = error\r\n    if (doc.body.children.length)\r\n      doc.body.insertBefore(pre, doc.body.children[0])\r\n    else\r\n      doc.body.appendChild(pre)\r\n  }\r\n}\r\n```"}}