This is a spec I’m currently drafting at https://github.com/stuartpb/pwalls-spec to solve a widespread problem many other developers and I have encountered with the current Web platform, in a simple, prollyfillable fashon that, unlike Web Components, doesn’t require widespread overhauls/throw-outs of an app/developer’s codebase, toolchain, organization pattern, or encapsulation model.
You can read the proposal on GitHub - rather than maintain a copy of the proposal in two places (GitHub and this post), I’m going to keep the proposal in that location up-to-date.
Some differences from when I initially wrote my draft and when I most recently edited this post (seen in the replies below):
- The Walled Descendant Selector (originally called the Proot Boundary Selector) was originally suggested as
|>as it is in the current spec.
- The original spec made a lot more references to Shadow DOM, which were removed because they made it seem like it was a declarative-DOM-encapsulation proposal.