{"action":"created","issue":{"url":"https://api.github.com/repos/angular/zone.js/issues/800","repository_url":"https://api.github.com/repos/angular/zone.js","labels_url":"https://api.github.com/repos/angular/zone.js/issues/800/labels{/name}","comments_url":"https://api.github.com/repos/angular/zone.js/issues/800/comments","events_url":"https://api.github.com/repos/angular/zone.js/issues/800/events","html_url":"https://github.com/angular/zone.js/pull/800","id":233361578,"number":800,"title":"fix(xhr): inner onreadystatechange should not use zoneAwareListener","user":{"login":"JiaLiPassion","id":1442575,"avatar_url":"https://avatars0.githubusercontent.com/u/1442575?v=3","gravatar_id":"","url":"https://api.github.com/users/JiaLiPassion","html_url":"https://github.com/JiaLiPassion","followers_url":"https://api.github.com/users/JiaLiPassion/followers","following_url":"https://api.github.com/users/JiaLiPassion/following{/other_user}","gists_url":"https://api.github.com/users/JiaLiPassion/gists{/gist_id}","starred_url":"https://api.github.com/users/JiaLiPassion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiaLiPassion/subscriptions","organizations_url":"https://api.github.com/users/JiaLiPassion/orgs","repos_url":"https://api.github.com/users/JiaLiPassion/repos","events_url":"https://api.github.com/users/JiaLiPassion/events{/privacy}","received_events_url":"https://api.github.com/users/JiaLiPassion/received_events","type":"User","site_admin":false},"labels":[{"id":78985380,"url":"https://api.github.com/repos/angular/zone.js/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-03T10:40:03Z","updated_at":"2017-06-15T12:59:09Z","closed_at":"2017-06-05T18:30:28Z","pull_request":{"url":"https://api.github.com/repos/angular/zone.js/pulls/800","html_url":"https://github.com/angular/zone.js/pull/800","diff_url":"https://github.com/angular/zone.js/pull/800.diff","patch_url":"https://github.com/angular/zone.js/pull/800.patch"},"body":"fix https://github.com/angular/angular/issues/17167,\r\nzone.js will patch xhr, and add onreadystatechange internally,\r\nthis onreadystatechange just for invoke the xhr MacroTask, so it should\r\nnot trigger ZoneSpec's callback.\r\n\r\nin this commit, use original native addEventListener/removeEventListener\r\nto add internal onreadystatechange event listener.\r\n\r\n\r\n```javascript\r\nif (listener) {\r\n  // don't use patched removeEventListener\r\n  oriRemoveListener.apply(data.target, ['readystatechange', listener]);\r\n}\r\nconst newListener = data.target[XHR_LISTENER] = () => {\r\n    if (data.target.readyState === data.target.DONE) {\r\n    // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\r\n    // readyState=4 multiple times, so we need to check task state here\r\n    if (!data.aborted && (XMLHttpRequest as any)[XHR_SCHEDULED] &&\r\n        task.state === 'scheduled') {\r\n      task.invoke();   \r\n    }\r\n  }\r\n};      \r\n// don't use patched addEventListener\r\noriAddListener.apply(data.target, ['readystatechange', newListener]);\r\n```"},"comment":{"url":"https://api.github.com/repos/angular/zone.js/issues/comments/308722208","html_url":"https://github.com/angular/zone.js/pull/800#issuecomment-308722208","issue_url":"https://api.github.com/repos/angular/zone.js/issues/800","id":308722208,"user":{"login":"MattJeanes","id":2363642,"avatar_url":"https://avatars3.githubusercontent.com/u/2363642?v=3","gravatar_id":"","url":"https://api.github.com/users/MattJeanes","html_url":"https://github.com/MattJeanes","followers_url":"https://api.github.com/users/MattJeanes/followers","following_url":"https://api.github.com/users/MattJeanes/following{/other_user}","gists_url":"https://api.github.com/users/MattJeanes/gists{/gist_id}","starred_url":"https://api.github.com/users/MattJeanes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattJeanes/subscriptions","organizations_url":"https://api.github.com/users/MattJeanes/orgs","repos_url":"https://api.github.com/users/MattJeanes/repos","events_url":"https://api.github.com/users/MattJeanes/events{/privacy}","received_events_url":"https://api.github.com/users/MattJeanes/received_events","type":"User","site_admin":false},"created_at":"2017-06-15T12:59:09Z","updated_at":"2017-06-15T12:59:09Z","body":"This seems to have broken IE support (at least from my testing), raised an issue here: #816"}}
{"actor":{"display_login":"MattJeanes"}}