Would HTML data attributes not enable developers to target a subset of the DOM? In terms of CSS's ability to target all <div>
's, doesn't the more specific selector (the one that says [data-role="widget"]
) win?
Javascript has modular pattern design available.
Why do we need a shadow DOM?