{"action":"created","issue":{"url":"https://api.github.com/repos/catberry/catberry/issues/196","labels_url":"https://api.github.com/repos/catberry/catberry/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/catberry/catberry/issues/196/comments","events_url":"https://api.github.com/repos/catberry/catberry/issues/196/events","html_url":"https://github.com/catberry/catberry/issues/196","id":103919811,"number":196,"title":"Proper way to listen component's bound event","user":{"login":"vaseker","id":1942271,"avatar_url":"https://avatars.githubusercontent.com/u/1942271?v=3","gravatar_id":"","url":"https://api.github.com/users/vaseker","html_url":"https://github.com/vaseker","followers_url":"https://api.github.com/users/vaseker/followers","following_url":"https://api.github.com/users/vaseker/following{/other_user}","gists_url":"https://api.github.com/users/vaseker/gists{/gist_id}","starred_url":"https://api.github.com/users/vaseker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaseker/subscriptions","organizations_url":"https://api.github.com/users/vaseker/orgs","repos_url":"https://api.github.com/users/vaseker/repos","events_url":"https://api.github.com/users/vaseker/events{/privacy}","received_events_url":"https://api.github.com/users/vaseker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-30T11:44:12Z","updated_at":"2015-08-30T12:05:19Z","closed_at":null,"body":"Is there a proper way to bind handler for component `bound` event?\r\nI did that:\r\n```javascript\r\nfunction Component() {\r\n\tthis.$context.on('componentBound', function (data) {\r\n\t\tif (data.element === this.$context.element) {\r\n\t\t\tthis._loaded();\r\n\t\t}\r\n\t}.bind(this));\r\n}\r\n```\r\nbut these listeners lives global and doesn't self-destructs."},"comment":{"url":"https://api.github.com/repos/catberry/catberry/issues/comments/136131190","html_url":"https://github.com/catberry/catberry/issues/196#issuecomment-136131190","issue_url":"https://api.github.com/repos/catberry/catberry/issues/196","id":136131190,"user":{"login":"pragmadash","id":887952,"avatar_url":"https://avatars.githubusercontent.com/u/887952?v=3","gravatar_id":"","url":"https://api.github.com/users/pragmadash","html_url":"https://github.com/pragmadash","followers_url":"https://api.github.com/users/pragmadash/followers","following_url":"https://api.github.com/users/pragmadash/following{/other_user}","gists_url":"https://api.github.com/users/pragmadash/gists{/gist_id}","starred_url":"https://api.github.com/users/pragmadash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pragmadash/subscriptions","organizations_url":"https://api.github.com/users/pragmadash/orgs","repos_url":"https://api.github.com/users/pragmadash/repos","events_url":"https://api.github.com/users/pragmadash/events{/privacy}","received_events_url":"https://api.github.com/users/pragmadash/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T12:05:19Z","updated_at":"2015-08-30T12:05:19Z","body":"I am not sure I got you right. Why do you need `componentBound` handler?\r\n\r\nActually when a component's method `bind` finishes its execution (or promise which is returned by method resolves) it is the moment when \"component is bound\". Why do you need to use additional event listening?"}}