{"action":"closed","issue":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/979","labels_url":"https://api.github.com/repos/tmpvar/jsdom/issues/979/labels{/name}","comments_url":"https://api.github.com/repos/tmpvar/jsdom/issues/979/comments","events_url":"https://api.github.com/repos/tmpvar/jsdom/issues/979/events","html_url":"https://github.com/tmpvar/jsdom/issues/979","id":51927993,"number":979,"title":"Making window.console more useful","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tmpvar/jsdom/labels/feature","name":"feature","color":"02e10c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-14T18:58:32Z","updated_at":"2015-02-17T21:03:42Z","closed_at":"2015-02-17T21:03:42Z","body":"Discussed previously in #971. The current tentative plan is:\r\n\r\n```js\r\nwindow.console.log(\"foo\"); // does nothing\r\n\r\nvar virtualConsole = jsdom.getVirtualConsole(window);\r\n// virtualConsole is a Node.js EventEmitter (not a jsdom EventTarget)\r\n\r\nwindow.console.log(\"foo\", \"bar\");\r\n// raises an event \"log\" with arguments \"foo\", \"bar\" on virtualConsole\r\n\r\nvirtualConsole.sendTo(console); // when window.console.log is called, calls console.log.\r\n```\r\n\r\n"}}