{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/703","labels_url":"https://api.github.com/repos/babel/babel/issues/703/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/703/comments","events_url":"https://api.github.com/repos/babel/babel/issues/703/events","html_url":"https://github.com/babel/babel/issues/703","id":56892669,"number":703,"title":"Class inheritance broken in IE 8 w/ es5-shim","user":{"login":"lukescott","id":486224,"avatar_url":"https://avatars.githubusercontent.com/u/486224?v=3","gravatar_id":"","url":"https://api.github.com/users/lukescott","html_url":"https://github.com/lukescott","followers_url":"https://api.github.com/users/lukescott/followers","following_url":"https://api.github.com/users/lukescott/following{/other_user}","gists_url":"https://api.github.com/users/lukescott/gists{/gist_id}","starred_url":"https://api.github.com/users/lukescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukescott/subscriptions","organizations_url":"https://api.github.com/users/lukescott/orgs","repos_url":"https://api.github.com/users/lukescott/repos","events_url":"https://api.github.com/users/lukescott/events{/privacy}","received_events_url":"https://api.github.com/users/lukescott/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-07T02:05:20Z","updated_at":"2015-11-03T14:05:17Z","closed_at":"2015-02-07T02:11:36Z","body":"Class inheritance is broken in IE 8, even with es5-shim. Specifically `this.constructor` is wrong in an inherited class.\r\n\r\nThe following fixes that:\r\n```javascript\r\nvar _inherits = function(subClass, superClass) {\r\n    if (typeof superClass !== \"function\" && superClass !== null) {\r\n        throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\r\n    }\r\n    subClass.prototype = Object.create(superClass && superClass.prototype, {\r\n        constructor: {\r\n            value: subClass,\r\n            enumerable: false,\r\n            writable: true,\r\n            configurable: true\r\n        }\r\n    });\r\n    if (subClass.prototype.constructor !== subClass) {\r\n    \tsubClass.prototype.constructor = subClass; // <-- corrects constructor\r\n    }\r\n    if (superClass) _defaults(subClass, superClass);\r\n};\r\n```\r\n\r\nThe reason it is broken is because the following doesn't work in IE8:\r\n\r\n```javascript\r\nvar properties = {\r\n    constructor: {}\r\n};\r\nfor (var name in properties) {\r\n    console.log(name); // <-- constructor is never iterated even though it is user defined\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/153364892","html_url":"https://github.com/babel/babel/issues/703#issuecomment-153364892","issue_url":"https://api.github.com/repos/babel/babel/issues/703","id":153364892,"user":{"login":"zloirock","id":2213682,"avatar_url":"https://avatars.githubusercontent.com/u/2213682?v=3","gravatar_id":"","url":"https://api.github.com/users/zloirock","html_url":"https://github.com/zloirock","followers_url":"https://api.github.com/users/zloirock/followers","following_url":"https://api.github.com/users/zloirock/following{/other_user}","gists_url":"https://api.github.com/users/zloirock/gists{/gist_id}","starred_url":"https://api.github.com/users/zloirock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zloirock/subscriptions","organizations_url":"https://api.github.com/users/zloirock/orgs","repos_url":"https://api.github.com/users/zloirock/repos","events_url":"https://api.github.com/users/zloirock/events{/privacy}","received_events_url":"https://api.github.com/users/zloirock/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T14:05:17Z","updated_at":"2015-11-03T14:05:17Z","body":"@piotr-cz should not. `babel` uses `Object.setPrototypeOf` / `__proto__` for subclassing, but it does ot mean it's not support IE10- - available alternative transformers. `babel` actively uses `Symbol.iterator`, `Object.assign`, `Array.from`, which missing in all versions IE, but it does not mean it's not supports IE - just use [polyfill](https://babeljs.io/docs/usage/polyfill/). The same situation with `Object.defineProperty` in IE8- - use polyfill and remember you can't use getters / setters."}}