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

JanMiksovsky commented on this pull request.



>  
-- *manually-assigned-nodes* are different than [assigned nodes]. For example, users can pass a node which is not host's children. We don't throw an exception even if such a *invalid* node is passed, however, *invalid* node is never selected as [assigned nodes]; the engine recaluculate [assigned nodes] later, based on *manually-assigned-nodes*. Invalid nodes in *manually-assigned-nodes* are simply ignored. The caculataed [assigned nodes] are only observable.
+Thus, we don't allow mixing the declarative and imperative APIs in the same shadow tree. Web developers must explicitly opt-in
+to use an imperative API for each shadow tree. They do this with a new "slotting" parameter on attachShadow():

Most of this proposal (and the existing spec) talks about _assignment_ rather than "slotting". Recommend reflecting that by changing the option to `assignment` (or maybe `slotAssignment`, etc.):

```this.attachShadow({ assignment: 'manual' })```

That makes the parameter's connection to the `assign()`, `assignedNodes`, and `assignedElements` more direct.

-- 
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#pullrequestreview-366062608

Received on Thursday, 27 February 2020 23:06:06 UTC