{"action":"created","issue":{"url":"https://api.github.com/repos/riot/riot/issues/1783","repository_url":"https://api.github.com/repos/riot/riot","labels_url":"https://api.github.com/repos/riot/riot/issues/1783/labels{/name}","comments_url":"https://api.github.com/repos/riot/riot/issues/1783/comments","events_url":"https://api.github.com/repos/riot/riot/issues/1783/events","html_url":"https://github.com/riot/riot/issues/1783","id":153971425,"number":1783,"title":"Confusing tag instance properties: which are supposed to be html nodes, which tag instances?","user":{"login":"juodumas","id":5197018,"avatar_url":"https://avatars.githubusercontent.com/u/5197018?v=3","gravatar_id":"","url":"https://api.github.com/users/juodumas","html_url":"https://github.com/juodumas","followers_url":"https://api.github.com/users/juodumas/followers","following_url":"https://api.github.com/users/juodumas/following{/other_user}","gists_url":"https://api.github.com/users/juodumas/gists{/gist_id}","starred_url":"https://api.github.com/users/juodumas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juodumas/subscriptions","organizations_url":"https://api.github.com/users/juodumas/orgs","repos_url":"https://api.github.com/users/juodumas/repos","events_url":"https://api.github.com/users/juodumas/events{/privacy}","received_events_url":"https://api.github.com/users/juodumas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/riot/riot/labels/discussion","name":"discussion","color":"ff44aa"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2016-05-10T10:16:35Z","updated_at":"2016-08-16T21:52:15Z","closed_at":null,"body":"Tag instances are populated with these properties:\r\n* this.root - Node\r\n* this.parent - Tag\r\n* this.tags - Object with custom tag names as keys and Array of Tag or Tag as values\r\n* this[value-of-name-attr] - Node in riot2, Node or Tag (for custom elements) in riot3\r\n* this.tags[value-of-name-attr] - Tag for custom elements in riot2, undefined in riot3\r\n\r\nhttp://plnkr.co/edit/p1I2rQiD4MpUofd9PC18?p=preview\r\n\r\nI find this confusing. Maybe riot3 could have better defined and documented apis for accessing child tag instances and element nodes? While I am not sure what to propose, I think that exposing both (named nodes, tags and all child tags) is very useful when working with custom tags, but it would be nice to have a more intuitive api. Btw., riot3 behavior feels logical after thinking about it, but I think it will be very confusing for newcomers.\r\n\r\n  - [ ] Question\r\n  - [ ] Bug\r\n  - [x] Discussion\r\n  - [ ] Feature request\r\n  - [ ] Tip\r\n  - [ ] Enhancement\r\n  - [ ] Performance\r\n"},"comment":{"url":"https://api.github.com/repos/riot/riot/issues/comments/240251117","html_url":"https://github.com/riot/riot/issues/1783#issuecomment-240251117","issue_url":"https://api.github.com/repos/riot/riot/issues/1783","id":240251117,"user":{"login":"planeguy","id":646355,"avatar_url":"https://avatars.githubusercontent.com/u/646355?v=3","gravatar_id":"","url":"https://api.github.com/users/planeguy","html_url":"https://github.com/planeguy","followers_url":"https://api.github.com/users/planeguy/followers","following_url":"https://api.github.com/users/planeguy/following{/other_user}","gists_url":"https://api.github.com/users/planeguy/gists{/gist_id}","starred_url":"https://api.github.com/users/planeguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/planeguy/subscriptions","organizations_url":"https://api.github.com/users/planeguy/orgs","repos_url":"https://api.github.com/users/planeguy/repos","events_url":"https://api.github.com/users/planeguy/events{/privacy}","received_events_url":"https://api.github.com/users/planeguy/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T21:52:15Z","updated_at":"2016-08-16T21:52:15Z","body":"I like always arrays because you always know what's coming out of them. If you expect only one, then as a programmer you can just this.refs['myref'][0], otherwise just this.refs['my-ref'].forEach(doSomething);"}}
{"actor":{"display_login":"planeguy"}}