{"action":"opened","issue":{"url":"https://api.github.com/repos/vega/vega-scenegraph/issues/29","repository_url":"https://api.github.com/repos/vega/vega-scenegraph","labels_url":"https://api.github.com/repos/vega/vega-scenegraph/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/vega/vega-scenegraph/issues/29/comments","events_url":"https://api.github.com/repos/vega/vega-scenegraph/issues/29/events","html_url":"https://github.com/vega/vega-scenegraph/issues/29","id":186969574,"number":29,"title":"jsdom-global conflict with headless renderer","user":{"login":"alecf","id":135340,"avatar_url":"https://avatars.githubusercontent.com/u/135340?v=3","gravatar_id":"","url":"https://api.github.com/users/alecf","html_url":"https://github.com/alecf","followers_url":"https://api.github.com/users/alecf/followers","following_url":"https://api.github.com/users/alecf/following{/other_user}","gists_url":"https://api.github.com/users/alecf/gists{/gist_id}","starred_url":"https://api.github.com/users/alecf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alecf/subscriptions","organizations_url":"https://api.github.com/users/alecf/orgs","repos_url":"https://api.github.com/users/alecf/repos","events_url":"https://api.github.com/users/alecf/events{/privacy}","received_events_url":"https://api.github.com/users/alecf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-03T02:59:16Z","updated_at":"2016-11-03T02:59:16Z","closed_at":null,"body":"in the 1.x branch, vega-scenegraph is using detection of document.createElement to determine if it is safe to create a `<canvas>` element rather than using node-canvas:\r\n\r\nhttps://github.com/vega/vega-scenegraph/blob/v1.x/src/util/canvas.js#L6\r\n\r\nWhen using react testing libraries like https://github.com/airbnb/enzyme, you need to have a global `jsdom` loaded: https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md and the `<canvas>` in jsdom is insufficient for the canvas renderer.\r\n\r\nthis means that no matter what, vega-scenegraph is going to try to use  jsdom's `<canvas>` element.\r\n\r\nIt would be nice if there were a better way to detect if `document.createElement()` should be used or not, or even better be able to force the use of `node-canvas`\r\n"}}
{"actor":{"display_login":"alecf"}}