Re: [w3c/webcomponents] flatten: true in assignedNodes doesn't make much sense when a slot doesn't have display: contents (#493)

> When a slot element assigned to another slot has `display` value other than `contents`, it doesn't make much sense to unwrap it in `assignedNodes` since those elements would definitely show up in the rendering.

The API was designed in the era: "slot is not included in the flat tree", to meet the following demand:

- Developers wanted to know the *effective children* ("child nodes in the flat tree"), because their interest is effective child nodes, in practice. That's the most important point.

In v0, we had `InsertionPoint.getDistributedNodes()`, which is basically equivalent to the current assignedNodes({flatten: true} in v1, which tell us the effective child nodes.
The reason why *slotchange* events is for distributed nodes, rather than for assigned nodes, is the same. They wanted to know the change of effective children.



---
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/issues/493#issuecomment-217868101

Received on Monday, 9 May 2016 14:25:08 UTC