So, web components • break a11y • break progressive enhancement (no SSR, broken without JS) • don't work with SVG • share a global namespace instead of being modular • ... Imagine how much tedious moralising we'd see if JS frameworks shipped with similar limitationshttps://twitter.com/sarahmei/status/1198069119897047041 …
-
-
Replying to @Rich_Harris @devongovett
I don’t understand why the shadow dom didn’t start as a declarative feature (as in <shadow-root> in HTML vs. JS-first). That alone would have solved a lot of these problems, and could have possibly had a very predictable “just works” fallback behavior in older browsers.
3 replies 2 retweets 15 likes -
Replying to @tolmasky @devongovett
I've wondered about this, as it's often raised as a potential solution to the SSR issue. I'm not sure it quite works though — you'd presumably have to define the markup in the JS class *as well*, and figure out the semantics around hydration (esp. with mismatches)
2 replies 0 retweets 6 likes -
Because it's much, *much* harder. We explored declarative extensively; became obvious that other vendors could never agree to it w/o imperative first...so we did what we could. I still hope we'll get back to that; won't happen w/ folks assuming bad faith, tho.
1 reply 0 retweets 15 likes -
Sure but now we’re in a world where we simultaneously tell people they use JS too much but also that *the way* to do things going forward is JS first. It’s confusing saying dump your bloated JS frameworks for... this other JS thing. Not saying it’s wrong, just an uphill battle.
2 replies 0 retweets 1 like -
The second half of that is clearly misbegotten. We need to reduce JS dependence overall, and WC can help. No silver bullets, tho. Only hard graft.
1 reply 0 retweets 3 likes -
I don’t think it’s misbegotten, I think you’re focusing on correctness and I’m trying to express intuitiveness. The idea that a JS API (that has no non-JS fallback) will help remove our dependence from JS is understandably counter-intuitive.
1 reply 0 retweets 2 likes -
Replying to @tolmasky @slightlylate and
I further think that it is not unreasonable to predict that having such a fundamental part of basic web UI rely on JS (in a way nothing before has had to), *might* inadvertently signal a green light to use *more* JS.
1 reply 0 retweets 1 like
Agree re: counter-intuitive; I see this as a different starting points. One says "the platform is trash, start with JS and compile down". The other says "the platform isn't great, but we can patch in only what we need". WC are built from the second and work best there.
-
-
Replying to @slightlylate @tolmasky and
That is, if you start with an HTML/markup-first mindset, WC for PE work well. If you start with an absolutist "I'm trying to replace the DOM, whatcha got for me?" perspective, it's *clearly* unsatisfying.
2 replies 0 retweets 3 likes -
Replying to @slightlylate @tolmasky and
Anyhow, hear you on the desire for a declarative form. I hope other vendors do too. Now that Mozilla and MSFT are finally caught up, optimistic we can land new features faster going forward.
0 replies 0 retweets 4 likes
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.