{"action":"opened","issue":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/1683","repository_url":"https://api.github.com/repos/tmpvar/jsdom","labels_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1683/labels{/name}","comments_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1683/comments","events_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1683/events","html_url":"https://github.com/tmpvar/jsdom/issues/1683","id":197036306,"number":1683,"title":"getComputedStyle doesn't work for backgrounds set via the background attribute","user":{"login":"DoomTay","id":9124594,"avatar_url":"https://avatars.githubusercontent.com/u/9124594?v=3","gravatar_id":"","url":"https://api.github.com/users/DoomTay","html_url":"https://github.com/DoomTay","followers_url":"https://api.github.com/users/DoomTay/followers","following_url":"https://api.github.com/users/DoomTay/following{/other_user}","gists_url":"https://api.github.com/users/DoomTay/gists{/gist_id}","starred_url":"https://api.github.com/users/DoomTay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoomTay/subscriptions","organizations_url":"https://api.github.com/users/DoomTay/orgs","repos_url":"https://api.github.com/users/DoomTay/repos","events_url":"https://api.github.com/users/DoomTay/events{/privacy}","received_events_url":"https://api.github.com/users/DoomTay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-21T21:24:41Z","updated_at":"2016-12-21T21:24:41Z","closed_at":null,"body":"Using getComputedStyle con an element with a background attribute does not get the background for that element, even though Firefox and Chrome retrieve the background the same way\r\n\r\nTake this sample slightly tweaked from #1160\r\n\r\n```var jsdom = require(\"jsdom\");\r\nvar pageHTML = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head></head><body><div background=\"http://example.com/no.png\"></div></body></html>';\r\n\r\njsdom.env({\r\n    html: pageHTML,\r\n    done: function(err, window) {\r\n        var div = window.document.getElementsByTagName(\"div\")[0];\r\n        var sty = window.getComputedStyle(div);\r\n        console.log(sty[\"background-image\"]); // => empty string\r\n        console.log(sty.backgroundImage); // => empty string\r\n    }\r\n});```"}}
{"actor":{"display_login":"DoomTay"}}