How to distribute (insert) content nodes programmatically

前端 未结 2 1185
隐瞒了意图╮
隐瞒了意图╮ 2021-02-06 19:18

Is there a way to programmatically distribute (insert) content from lightDOM to ShadowDOM?

I would like to wrap every single child node into an element. For example :

2条回答
  •  余生分开走
    2021-02-06 19:42

    Composition is something Shadow DOM is designed for. If that spec bug gets fixed, the best way to do this would be interesting tricks with in a