Playing with Shadow DOM | CSS-Tricks
In Playing with Shadow DOM Chris takes a look at why Twitter moved away from using iframes with their embeddable tweets
TL;DR:
-
Shadow DOM is pretty cool.
-
It’s comparable to an iframe in many ways, including style encapsulation. Embedded third-party content is a pretty good use case.
-
It’s possible to use it while falling back to an iframe pretty easily.
-
It’s a part of the larger world of web components, but you don’t have to go all-in on all that if you don’t want to.