{"action":"created","issue":{"url":"https://api.github.com/repos/muut/riotjs/issues/582","labels_url":"https://api.github.com/repos/muut/riotjs/issues/582/labels{/name}","comments_url":"https://api.github.com/repos/muut/riotjs/issues/582/comments","events_url":"https://api.github.com/repos/muut/riotjs/issues/582/events","html_url":"https://github.com/muut/riotjs/issues/582","id":67537435,"number":582,"title":"Nested tag 'mount' too early","user":{"login":"hiscodeness","id":8625258,"avatar_url":"https://avatars.githubusercontent.com/u/8625258?v=3","gravatar_id":"","url":"https://api.github.com/users/hiscodeness","html_url":"https://github.com/hiscodeness","followers_url":"https://api.github.com/users/hiscodeness/followers","following_url":"https://api.github.com/users/hiscodeness/following{/other_user}","gists_url":"https://api.github.com/users/hiscodeness/gists{/gist_id}","starred_url":"https://api.github.com/users/hiscodeness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiscodeness/subscriptions","organizations_url":"https://api.github.com/users/hiscodeness/orgs","repos_url":"https://api.github.com/users/hiscodeness/repos","events_url":"https://api.github.com/users/hiscodeness/events{/privacy}","received_events_url":"https://api.github.com/users/hiscodeness/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-04-10T08:07:31Z","updated_at":"2015-05-11T15:19:41Z","closed_at":null,"body":"Inside a nested tag, the DOM objects aren't available when 'mount' event of the nested tag is triggered. Because of this I have to listen to the top level parent tag's 'mount' to do any binding or attach handlers to DOM objects. \r\n\r\nFor example, I have to do this in a nested tag:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/8625258/7083971/a8ca0f2e-df70-11e4-907d-89c83e173b2f.png)\r\n\r\nNotice the `this.parent.parent.on('mount'...`. \r\n\r\nWhat I'd prefer to do is this:\r\n![image](https://cloud.githubusercontent.com/assets/8625258/7083980/be6847f6-df70-11e4-94cf-93d34d4ad3ed.png)\r\n\r\nBut I can't do this since the `<div>` doesn't yet exist when child 'mount' is triggered. Is this by design? This forces child tags to know how deeply nested they are, which I think creates unnecessary coupling.\r\n\r\nTested with 2.0.14."},"comment":{"url":"https://api.github.com/repos/muut/riotjs/issues/comments/100941381","html_url":"https://github.com/muut/riotjs/issues/582#issuecomment-100941381","issue_url":"https://api.github.com/repos/muut/riotjs/issues/582","id":100941381,"user":{"login":"iamliqiang","id":1259331,"avatar_url":"https://avatars.githubusercontent.com/u/1259331?v=3","gravatar_id":"","url":"https://api.github.com/users/iamliqiang","html_url":"https://github.com/iamliqiang","followers_url":"https://api.github.com/users/iamliqiang/followers","following_url":"https://api.github.com/users/iamliqiang/following{/other_user}","gists_url":"https://api.github.com/users/iamliqiang/gists{/gist_id}","starred_url":"https://api.github.com/users/iamliqiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamliqiang/subscriptions","organizations_url":"https://api.github.com/users/iamliqiang/orgs","repos_url":"https://api.github.com/users/iamliqiang/repos","events_url":"https://api.github.com/users/iamliqiang/events{/privacy}","received_events_url":"https://api.github.com/users/iamliqiang/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T15:19:41Z","updated_at":"2015-05-11T15:19:41Z","body":"Nexttick() almost trigger right now, because it was inserted eventloop at first,  so, when it is triggered, the target element may be not exist on Dom"}}