|
|
|
|
|
by derekzhouzhen
396 days ago
|
|
You can use shadow-dom without using web-component. web-component and shadow-dom are orthogonal to eachother: * web-component is a way to attache javascript to certain elements. There are other ways to do it, but sometime this way feel cleaner, like when you do server-side rendering and not using any javascript framework. * shadow-dom is a way to organize your styles. As you said there are other ways to do it, but I find it useful because it offers full isolation, and is compatible with browsers 3 years back. |
|