{"action":"created","issue":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/1248","labels_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1248/labels{/name}","comments_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1248/comments","events_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1248/events","html_url":"https://github.com/tmpvar/jsdom/issues/1248","id":108934113,"number":1248,"title":"jQuery.get() always fails","user":{"login":"alfonsomunozpomer","id":4425744,"avatar_url":"https://avatars.githubusercontent.com/u/4425744?v=3","gravatar_id":"","url":"https://api.github.com/users/alfonsomunozpomer","html_url":"https://github.com/alfonsomunozpomer","followers_url":"https://api.github.com/users/alfonsomunozpomer/followers","following_url":"https://api.github.com/users/alfonsomunozpomer/following{/other_user}","gists_url":"https://api.github.com/users/alfonsomunozpomer/gists{/gist_id}","starred_url":"https://api.github.com/users/alfonsomunozpomer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfonsomunozpomer/subscriptions","organizations_url":"https://api.github.com/users/alfonsomunozpomer/orgs","repos_url":"https://api.github.com/users/alfonsomunozpomer/repos","events_url":"https://api.github.com/users/alfonsomunozpomer/events{/privacy}","received_events_url":"https://api.github.com/users/alfonsomunozpomer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-29T18:47:05Z","updated_at":"2015-10-08T13:23:19Z","closed_at":null,"body":"Hi, I was trying to test an AJAX request with jQuery and jsdom, but it doesn’t seem to work. Using `xmlhttprequest` works, though:\r\n\r\n```\r\nvar jsdom = require(\"jsdom\");\r\nvar XMLHttpRequest = require(\"xmlhttprequest\").XMLHttpRequest;\r\n\r\njsdom.env(\r\n  '<html></html>',\r\n  [\"http://code.jquery.com/jquery.js\"],\r\n  function (err, window) {\r\n    var $ = window.$;\r\n    $.get(\"http://www.ebi.ac.uk/gxa/resources/html/help-tooltips.experiment-page.html\", function(data) {\r\n      console.log(data);\r\n    }).fail(function() {\r\n      console.log(\"Error\");\r\n    })\r\n    .always(function() {\r\n      console.log(\"Finished\");\r\n    });\r\n\r\n    var xhr = new XMLHttpRequest();\r\n    xhr.open('GET', 'http://www.ebi.ac.uk/gxa/resources/html/help-tooltips.experiment-page.html', true);\r\n\r\n    xhr.onreadystatechange = function() {\r\n        if(xhr.readyState == 4) {\r\n            if(xhr.status == 200) {\r\n                console.log(xhr.responseText);\r\n            }\r\n            else {\r\n                console.log(xhr.status);\r\n            }\r\n        }\r\n    };\r\n\r\n    xhr.send();\r\n  }\r\n);\r\n```\r\n\r\nI always get `Error` with `$.get` no matter what. Is there anything I’m not doing right?"},"comment":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/comments/146543912","html_url":"https://github.com/tmpvar/jsdom/issues/1248#issuecomment-146543912","issue_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1248","id":146543912,"user":{"login":"Sebmaster","id":347870,"avatar_url":"https://avatars.githubusercontent.com/u/347870?v=3","gravatar_id":"","url":"https://api.github.com/users/Sebmaster","html_url":"https://github.com/Sebmaster","followers_url":"https://api.github.com/users/Sebmaster/followers","following_url":"https://api.github.com/users/Sebmaster/following{/other_user}","gists_url":"https://api.github.com/users/Sebmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/Sebmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sebmaster/subscriptions","organizations_url":"https://api.github.com/users/Sebmaster/orgs","repos_url":"https://api.github.com/users/Sebmaster/repos","events_url":"https://api.github.com/users/Sebmaster/events{/privacy}","received_events_url":"https://api.github.com/users/Sebmaster/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T13:23:19Z","updated_at":"2015-10-08T13:23:19Z","body":"Apparently because of our incomplete XHR implementation, the check is [here](https://github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/ajax/xhr.js#L24)."}}