sashafirsov / slotted-element

fetch-element and slotted-element web components to expose fetch() functionality, render JSON as HTML and support fetch() lifecycle via slot without ShadowDOM
Apache License 2.0
13 stars 0 forks source link

support multiple slots with same name #8

Open sashafirsov opened 3 years ago

sashafirsov commented 3 years ago

slotClone(name) does the clone of single slot for now. CONS: the return of cloned Node does not allow to work with multiple clones. Solution: return the ApiChain with mix-in of HTMLElement API and Array where operations on single element would be propagated to all in collection. It would keep the implementation backward compatible with single slot returned and allow to work with collection.

https://github.com/sashafirsov/api-chain-test