{"action":"created","issue":{"url":"https://api.github.com/repos/ecomfe/oo/issues/23","labels_url":"https://api.github.com/repos/ecomfe/oo/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/ecomfe/oo/issues/23/comments","events_url":"https://api.github.com/repos/ecomfe/oo/issues/23/events","html_url":"https://github.com/ecomfe/oo/issues/23","id":71458079,"number":23,"title":"定义私有成员","user":{"login":"Exodia","id":2111298,"avatar_url":"https://avatars.githubusercontent.com/u/2111298?v=3","gravatar_id":"","url":"https://api.github.com/users/Exodia","html_url":"https://github.com/Exodia","followers_url":"https://api.github.com/users/Exodia/followers","following_url":"https://api.github.com/users/Exodia/following{/other_user}","gists_url":"https://api.github.com/users/Exodia/gists{/gist_id}","starred_url":"https://api.github.com/users/Exodia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Exodia/subscriptions","organizations_url":"https://api.github.com/users/Exodia/orgs","repos_url":"https://api.github.com/users/Exodia/repos","events_url":"https://api.github.com/users/Exodia/events{/privacy}","received_events_url":"https://api.github.com/users/Exodia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-28T02:26:38Z","updated_at":"2015-09-06T03:49:23Z","closed_at":null,"body":"```javascript\r\nvar exports = {};\r\nexports.$privae = {};\r\nexports.$private.privateMethod = function () {};\r\nexports.$private.privateMember = 'private';\r\nexports.publicMethod = function () {\r\n    this.privateMethod();\r\n};\r\n\r\nvar MyClass = oo.Class(exports);\r\n\r\nvar instance = new MyClass();\r\ninstance.publishMethod();\r\n\r\ninstance.privateMethod() // throw error;\r\ninstance.privateMember() // throw error\r\n```\r\n\r\n实现上：\r\n\r\n会借助Object.defineProperty的 getter/setter 和 caller__owner__ 来做限制，ie8下不做支持，毕竟我们的开发调试流程是在支持es5的环境下下进行的，仅仅是定义了开发模型，不会对 ie8造成功能影响。\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ecomfe/oo/issues/comments/138038937","html_url":"https://github.com/ecomfe/oo/issues/23#issuecomment-138038937","issue_url":"https://api.github.com/repos/ecomfe/oo/issues/23","id":138038937,"user":{"login":"Justineo","id":1726061,"avatar_url":"https://avatars.githubusercontent.com/u/1726061?v=3","gravatar_id":"","url":"https://api.github.com/users/Justineo","html_url":"https://github.com/Justineo","followers_url":"https://api.github.com/users/Justineo/followers","following_url":"https://api.github.com/users/Justineo/following{/other_user}","gists_url":"https://api.github.com/users/Justineo/gists{/gist_id}","starred_url":"https://api.github.com/users/Justineo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Justineo/subscriptions","organizations_url":"https://api.github.com/users/Justineo/orgs","repos_url":"https://api.github.com/users/Justineo/repos","events_url":"https://api.github.com/users/Justineo/events{/privacy}","received_events_url":"https://api.github.com/users/Justineo/received_events","type":"User","site_admin":false},"created_at":"2015-09-06T03:49:23Z","updated_at":"2015-09-06T03:49:23Z","body":"好的，`private` 和 `protected` 只是开发环境限制是吧。"}}