{"action":"closed","issue":{"url":"https://api.github.com/repos/riot/riot/issues/934","labels_url":"https://api.github.com/repos/riot/riot/issues/934/labels{/name}","comments_url":"https://api.github.com/repos/riot/riot/issues/934/comments","events_url":"https://api.github.com/repos/riot/riot/issues/934/events","html_url":"https://github.com/riot/riot/issues/934","id":93706173,"number":934,"title":"A way to access the riot component instance from the DOM element","user":{"login":"pitaj","id":803701,"avatar_url":"https://avatars.githubusercontent.com/u/803701?v=3","gravatar_id":"","url":"https://api.github.com/users/pitaj","html_url":"https://github.com/pitaj","followers_url":"https://api.github.com/users/pitaj/followers","following_url":"https://api.github.com/users/pitaj/following{/other_user}","gists_url":"https://api.github.com/users/pitaj/gists{/gist_id}","starred_url":"https://api.github.com/users/pitaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitaj/subscriptions","organizations_url":"https://api.github.com/users/pitaj/orgs","repos_url":"https://api.github.com/users/pitaj/repos","events_url":"https://api.github.com/users/pitaj/events{/privacy}","received_events_url":"https://api.github.com/users/pitaj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/riot/riot/labels/question","name":"question","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-08T06:12:50Z","updated_at":"2015-07-10T21:26:34Z","closed_at":"2015-07-10T21:26:34Z","body":"For instance, if I have the DOM element in my parent component, I could access the variables of child components like so:\r\n\r\n```html\r\n<chil>\r\n  <input name=\"into\"></input>\r\n\r\n  <script>\r\n    this.on('update', function(){\r\n      this.into.value = this.specific;\r\n    });\r\n  </script>\r\n</chil>\r\n<par>\r\n  <chil name=\"thing\"></chil>\r\n  <a onclick={ clearit }>Clear the chil</a>\r\n  <script>\r\n    clearit(){\r\n      this.thing.riot.specific = \"\";\r\n      this.thing.riot.update();\r\n    }\r\n  </script>\r\n</par>\r\n```\r\n\r\nRight now, there is no way to do this without including a mixin in every single component as far as I know."}}