Shadow DOM review does not do what you want.
Im part of a team using the Shadow DOM in Chrome. The comment in the specification is the correct content in the Shadow DOM, which is displayed once no more than once.
Here are a few ideas that may be helpful, depending on what exactly you are trying to achieve:
Firefox has an experimental feature in which an element can be used as a background. This is hooked into CSS using background: -moz-element(#foo); where foo is the identifier of the item you want to copy. The image is "live"; changes to an element are reflected wherever it is used as a background.
Using -moz-element has several potential disadvantages: it is implemented only in some versions of Firefox; it is experimental, which means that the function may change or go away at some point; and the copy is not interactive - you cannot click on the buttons there, hovering over the copy does not cause styles :hover , etc.
If you want all copies to be interactive, use Mutation Observers. There is a library called Mutation Summary , which includes Mutation Observers and includes a Chrome extension example that reflects the entire page. You can adapt it to the mirror of the DOM subtree. Depending on your application, you can also use the Mutation Observer to mirror the DOM in two directions.
source share