{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/html/issues/3534","repository_url":"https://api.github.com/repos/whatwg/html","labels_url":"https://api.github.com/repos/whatwg/html/issues/3534/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/html/issues/3534/comments","events_url":"https://api.github.com/repos/whatwg/html/issues/3534/events","html_url":"https://github.com/whatwg/html/issues/3534","id":302576085,"number":3534,"title":"Imperative shadow DOM distribution API","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars0.githubusercontent.com/u/617481?v=4","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[{"id":255178143,"url":"https://api.github.com/repos/whatwg/html/labels/addition/proposal","name":"addition/proposal","color":"d4c5f9","default":false},{"id":338224130,"url":"https://api.github.com/repos/whatwg/html/labels/topic:%20shadow","name":"topic: shadow","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2018-03-06T06:11:35Z","updated_at":"2018-03-09T05:07:30Z","closed_at":null,"author_association":"OWNER","body":"Writing down the stuff we talked about with @rniwa, @hayatoito, et al yesterday:\r\n\r\nWe should add a `slotElement.reassign(...nodes)` which reassigns the nodes.\r\n\r\nHow does this interact with the existing declarative distribution API? Maybe it just throws if the `name=\"\"` attribute is specified at all; that seems nice and simple.\r\n\r\nThis API is not \"perfect\" because authors don't have enough hooks to call it as often as you might want. E.g. if you are trying to emulate details/summary, you will use a MutationObserver to watch for child node changes and do `slotEl.reassign(theDetailsIFound)`. This happens at microtask timing, which is later than is done for the browser's native details/summary (people tell me that happens at style recalc timing).\r\n\r\nBut, it's pretty darn good!! I'm really excited about not putting `slot=\"\"` attributes everywhere.\r\n\r\nAny further thoughts?"},"comment":{"url":"https://api.github.com/repos/whatwg/html/issues/comments/371714787","html_url":"https://github.com/whatwg/html/issues/3534#issuecomment-371714787","issue_url":"https://api.github.com/repos/whatwg/html/issues/3534","id":371714787,"user":{"login":"rniwa","id":285965,"avatar_url":"https://avatars0.githubusercontent.com/u/285965?v=4","gravatar_id":"","url":"https://api.github.com/users/rniwa","html_url":"https://github.com/rniwa","followers_url":"https://api.github.com/users/rniwa/followers","following_url":"https://api.github.com/users/rniwa/following{/other_user}","gists_url":"https://api.github.com/users/rniwa/gists{/gist_id}","starred_url":"https://api.github.com/users/rniwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rniwa/subscriptions","organizations_url":"https://api.github.com/users/rniwa/orgs","repos_url":"https://api.github.com/users/rniwa/repos","events_url":"https://api.github.com/users/rniwa/events{/privacy}","received_events_url":"https://api.github.com/users/rniwa/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T05:07:30Z","updated_at":"2018-03-09T05:07:30Z","author_association":"COLLABORATOR","body":"> I think there is misunderstanding. Even if `slotX.assign(d)` is called, `slotX.assignedNodes()` doesn't contain `d`, according to my proposal. `d` is never used as assigned nodes of `slotX` because `d` is not the host `a`'s child.\r\n\r\nOkay, then your proposal doesn't satisfy a major use case of the imperative API to select a non-child node of a shadow host. I don't think that's okay. An imperative API should allow slotting of an arbitrarily deep descendent node.\r\n"}}
{"actor":{"display_login":"rniwa"}}