{"action":"opened","issue":{"url":"https://api.github.com/repos/lhorie/mithril.js/issues/1245","repository_url":"https://api.github.com/repos/lhorie/mithril.js","labels_url":"https://api.github.com/repos/lhorie/mithril.js/issues/1245/labels{/name}","comments_url":"https://api.github.com/repos/lhorie/mithril.js/issues/1245/comments","events_url":"https://api.github.com/repos/lhorie/mithril.js/issues/1245/events","html_url":"https://github.com/lhorie/mithril.js/issues/1245","id":171531557,"number":1245,"title":"[rewrite] Rethinking the removal hooks.","user":{"login":"pygy","id":54515,"avatar_url":"https://avatars.githubusercontent.com/u/54515?v=3","gravatar_id":"","url":"https://api.github.com/users/pygy","html_url":"https://github.com/pygy","followers_url":"https://api.github.com/users/pygy/followers","following_url":"https://api.github.com/users/pygy/following{/other_user}","gists_url":"https://api.github.com/users/pygy/gists{/gist_id}","starred_url":"https://api.github.com/users/pygy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pygy/subscriptions","organizations_url":"https://api.github.com/users/pygy/orgs","repos_url":"https://api.github.com/users/pygy/repos","events_url":"https://api.github.com/users/pygy/events{/privacy}","received_events_url":"https://api.github.com/users/pygy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-16T22:18:01Z","updated_at":"2016-08-16T22:18:01Z","closed_at":null,"body":"The current design of the `onbeforeremove` and `onremove` hooks is not optimal.\r\n\r\n- `onremove` is called before the elements are inserted. It could be useful to run code after the `disconnectedCallback` hook of a custom element, for example, and the current design won't allow it.\r\n\r\n- but if we moved it afterwards, we want to run `onbeforeremove` on every node to be removed, not just the root. We could pass `done` to the hooks of the detached vnode (the ones that currently have their `onbeforeremove` honoured), and `null` deeper down the tree. Still, this hook would conflate two distinct concerns: cleanup before node removal and delaying the removal.\r\n\r\n- alternatively, we could decouple cleanup and delay hooks. That would be cleaner, IMO."}}
{"actor":{"display_login":"pygy"}}