{"action":"created","issue":{"url":"https://api.github.com/repos/muut/riotjs/issues/330","labels_url":"https://api.github.com/repos/muut/riotjs/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/muut/riotjs/issues/330/comments","events_url":"https://api.github.com/repos/muut/riotjs/issues/330/events","html_url":"https://github.com/muut/riotjs/issues/330","id":57152003,"number":330,"title":"unmount should only remove those mountTo added to the dom","user":{"login":"Centaur","id":265524,"avatar_url":"https://avatars.githubusercontent.com/u/265524?v=3","gravatar_id":"","url":"https://api.github.com/users/Centaur","html_url":"https://github.com/Centaur","followers_url":"https://api.github.com/users/Centaur/followers","following_url":"https://api.github.com/users/Centaur/following{/other_user}","gists_url":"https://api.github.com/users/Centaur/gists{/gist_id}","starred_url":"https://api.github.com/users/Centaur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Centaur/subscriptions","organizations_url":"https://api.github.com/users/Centaur/orgs","repos_url":"https://api.github.com/users/Centaur/repos","events_url":"https://api.github.com/users/Centaur/events{/privacy}","received_events_url":"https://api.github.com/users/Centaur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-10T09:50:04Z","updated_at":"2015-02-10T10:43:56Z","closed_at":null,"body":"Two of my favorite aspects of Riot over React are \r\n1. Riot does not require custom tags to have single top element. This makes Riot friendly to situations that html dom structure cannot be modified.\r\n2. In Riot we can use `mountTo` to mount custom tags to standard dom element such as `div`. This makes Riot friendly to teams that have dedicated roles to work on static html pages. \r\n\r\nSay we have a container `<div id=\"target\"></div>` on page and we mount a Riot tag `<my-tag>Tag Content </my-tag>` to it `var myTag = riot.mountTo(document.getElementById('target'), 'my-tag')`. The page dom becomes `<div id=\"target\">Tag Content</div> `\r\n\r\nWhen I call `myTag.unmount()` the whole `<div id=\"target\">Tag Content</div>` is removed from the dom tree but my intention is to only remove those dom contents, in this case the `Tag Content` text, that `mountTo` added to the container. "},"comment":{"url":"https://api.github.com/repos/muut/riotjs/issues/comments/73679222","html_url":"https://github.com/muut/riotjs/issues/330#issuecomment-73679222","issue_url":"https://api.github.com/repos/muut/riotjs/issues/330","id":73679222,"user":{"login":"jsenjoy","id":4496552,"avatar_url":"https://avatars.githubusercontent.com/u/4496552?v=3","gravatar_id":"","url":"https://api.github.com/users/jsenjoy","html_url":"https://github.com/jsenjoy","followers_url":"https://api.github.com/users/jsenjoy/followers","following_url":"https://api.github.com/users/jsenjoy/following{/other_user}","gists_url":"https://api.github.com/users/jsenjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/jsenjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsenjoy/subscriptions","organizations_url":"https://api.github.com/users/jsenjoy/orgs","repos_url":"https://api.github.com/users/jsenjoy/repos","events_url":"https://api.github.com/users/jsenjoy/events{/privacy}","received_events_url":"https://api.github.com/users/jsenjoy/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T10:43:56Z","updated_at":"2015-02-10T10:43:56Z","body":"Maybe `mountTo` method to add the all custom tag including `<my-tag></my-tag>` into DOM is more reasonable？ @aurri @tipiirai "}}