{"action":"created","issue":{"url":"https://api.github.com/repos/t2ym/i18n-element/issues/6","repository_url":"https://api.github.com/repos/t2ym/i18n-element","labels_url":"https://api.github.com/repos/t2ym/i18n-element/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/t2ym/i18n-element/issues/6/comments","events_url":"https://api.github.com/repos/t2ym/i18n-element/issues/6/events","html_url":"https://github.com/t2ym/i18n-element/issues/6","id":180222045,"number":6,"title":"[Native CEv1][babel] customElements.define fails on ES5 class from Babel","user":{"login":"t2ym","id":16043714,"avatar_url":"https://avatars.githubusercontent.com/u/16043714?v=3","gravatar_id":"","url":"https://api.github.com/users/t2ym","html_url":"https://github.com/t2ym","followers_url":"https://api.github.com/users/t2ym/followers","following_url":"https://api.github.com/users/t2ym/following{/other_user}","gists_url":"https://api.github.com/users/t2ym/gists{/gist_id}","starred_url":"https://api.github.com/users/t2ym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t2ym/subscriptions","organizations_url":"https://api.github.com/users/t2ym/orgs","repos_url":"https://api.github.com/users/t2ym/repos","events_url":"https://api.github.com/users/t2ym/events{/privacy}","received_events_url":"https://api.github.com/users/t2ym/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-30T05:21:09Z","updated_at":"2016-09-30T05:44:12Z","closed_at":null,"body":"Native `customElements.define` fails on ES5 class from Babel.\r\n\r\nTranspiled ES5 `DomModule` cannot extend native `HTMLElement` class.\r\n\r\nUncaught TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.\r\n\r\n| customElements | Polymer | define |\r\n|:-----------------|:--------|:-------|\r\n| native | ES6 | success |\r\n| native | ES5 | failure |\r\n| polyfill | ES6 | success |\r\n| polyfill | ES5 | success |\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/t2ym/i18n-element/issues/comments/250663591","html_url":"https://github.com/t2ym/i18n-element/issues/6#issuecomment-250663591","issue_url":"https://api.github.com/repos/t2ym/i18n-element/issues/6","id":250663591,"user":{"login":"t2ym","id":16043714,"avatar_url":"https://avatars.githubusercontent.com/u/16043714?v=3","gravatar_id":"","url":"https://api.github.com/users/t2ym","html_url":"https://github.com/t2ym","followers_url":"https://api.github.com/users/t2ym/followers","following_url":"https://api.github.com/users/t2ym/following{/other_user}","gists_url":"https://api.github.com/users/t2ym/gists{/gist_id}","starred_url":"https://api.github.com/users/t2ym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t2ym/subscriptions","organizations_url":"https://api.github.com/users/t2ym/orgs","repos_url":"https://api.github.com/users/t2ym/repos","events_url":"https://api.github.com/users/t2ym/events{/privacy}","received_events_url":"https://api.github.com/users/t2ym/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T05:44:12Z","updated_at":"2016-09-30T05:44:12Z","body":"`apply(this,arguments)` does not work for native ES6 classes.  \r\n\r\nIs there any workaround for Babel to use the `new` operator, which is available in ES5 as well, in transpilation?\r\n\r\n```javascript\r\nvar DomModule = function(_HTMLElement) {\r\n  _inherits(DomModule,_HTMLElement);\r\n  function DomModule() {\r\n    _classCallCheck(this,DomModule);\r\n    return _possibleConstructorReturn(this,\r\n    (DomModule.__proto__||Object.getPrototypeOf(DomModule))\r\n      .apply(this,arguments));\r\n  }\r\n```"}}
{"actor":{"display_login":"t2ym"}}