Re: [w3c/webcomponents] Update Imperative-Shadow-DOM-Distribution-API.md (#866)

yuzhe-han commented on this pull request.



> + ```
+Some people would see this as a kind of *ugly* markup.
+Shadow DOM v1 can't explain how `<summary>/<details>` elements can be implemented on the top of the current Web Components technology stack, given that `<details>` element doesn't need slot= attribute.
+Blink has a special logic for some built-in elements to control node-to-slot mapping.
+ 
+#### Case 2: Can’t slot based on condition. 
+``` 
+<shadow-host num-to-show=”2”>
+   <div slot=”slot1”></div>
+   <div slot=”slot1”></div>
+   <div slot=”slot1”></div>
+</shadow-host>
+ ```
+The second issue is that component creators can’t change the slotting behavior based on condition. A component that wants to display a subset of slottable based on a property can’t easily be done via declarative slotting.
+
+## Imperative Slotting API

Got it. Example addedd and moved the internal concepts to appendix at the bottom.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/pull/866#discussion_r389204676

Received on Saturday, 7 March 2020 00:30:06 UTC