Web components - why <content> has been replaced by <slot>

Version 1.0 of the Shadow DOM will completely replace the <content> with <slot> . There are examples on the Internet. I cannot find an appropriate discussion that justifies this change.

What is the problem with <content> that <slot> will solve? After all, the new design is completely different.

+5
specifications web-component shadow-dom
Jul 23 '16 at 9:00
source share
1 answer

Shadow DOM specification editor is listed here.

It would be difficult to generalize the reason here, however, the following discussions and protocols may be helpful in understanding the history and reason:

Yes, Google is against this change at first, but we had no other choice to take the Shadow DOM forward. :)

I rewrote the Shadow DOM specification as "v1" to become the standard that all browser vendors could agree to. This is the main reason.

We all know that changing the API is painful for web developers, but I thought the β€œDative Dome DOM in every browser” is very important for the web platform in the long run.

See also here for other changes between v0 and v1:

+4
Jul 25 '16 at 2:18
source share
β€” -



All Articles