{"action":"created","issue":{"url":"https://api.github.com/repos/jeffmo/es-class-properties/issues/4","labels_url":"https://api.github.com/repos/jeffmo/es-class-properties/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jeffmo/es-class-properties/issues/4/comments","events_url":"https://api.github.com/repos/jeffmo/es-class-properties/issues/4/events","html_url":"https://github.com/jeffmo/es-class-properties/issues/4","id":107070907,"number":4,"title":"Automatically adding a new public API member [Symbol.classProperties] to every class that uses a given syntax is not good","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-17T20:46:34Z","updated_at":"2015-09-18T05:23:04Z","closed_at":null,"body":"This makes this proposal unusable for libraries which need to conform to specified API contracts, for example jsdom.\r\n\r\nIt's also very strange that using syntax in an otherwise-normal class suddenly introduces a new member on that class that you didn't declare.\r\n\r\nA realistic alternative would be some kind of reflective API that is not installed as a member on the class and on its prototype. Although the motivation for this entire reflective API story is lacking, being only a couple sentences in the current docs."},"comment":{"url":"https://api.github.com/repos/jeffmo/es-class-properties/issues/comments/141348688","html_url":"https://github.com/jeffmo/es-class-properties/issues/4#issuecomment-141348688","issue_url":"https://api.github.com/repos/jeffmo/es-class-properties/issues/4","id":141348688,"user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T05:23:04Z","updated_at":"2015-09-18T05:23:04Z","body":"The DOM interfaces do not have this extra symbol present.  So a conforming implementation of them, e.g. jsdom or a self-hosted browser implementation, cannot use this proposal as is. \r\n\r\nThat motivation is not very good. Classes have many properties today (set in the constructor) that are not exposed to reflection.\r\n\r\nAnyway, all of this is moot as per #1 this proposal is simply impossible as is. You cannot allow the insertion of synchronously running user code in the middle of the HTML parser or the property descriptor creation algorithm or anything else, without breaking a ton of assumed invariants."}}