Re: [webcomponents] Finalize the slots proposal (#128)

Yeah, but we should be aware that main use case of `getDestinationInsertionPoints()` is the last element of the return value of it, *final destination insertion point*. There, the node is *rendered*.

If we provide *only* `assignedSlot` which returns a directly assigned slot, we are forcing web developers to write a utility function, such as:

```javascript
function finalDestinationSlotFor(node) {
  var slot = node.assignedSlot;
  while (slot.assignedSlot) {
    slot = assignedSlot;
  }
  return slot;
}
```

This takes O(N), but I'm sure that the platform can return the same result in O(1), though it depends on the implementation of user-agent.

I guess the time doesn't matter here. So providing only `assignedSlot` might be okay.



---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/128#issuecomment-126562867

Received on Friday, 31 July 2015 04:25:09 UTC