Declarative Shadow DOM

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • webcomponents

    Web Components specifications

  • Does this mean we'll finally get Template-Instantiation[0], providing a native way to do HTML templates in the browser?

    There's been a bunch of hand waving that the reason we still don't have this is because they needed a solution for encapsulation and a solution for SSR. Now we have both. Can we please finally deliver on something people have been asking for since the mid 2000s?

    [0]: https://github.com/WICG/webcomponents/blob/gh-pages/proposal...

  • standards-positions

  • Thankfully, Firefox recently changed their stance from "Neutral" to "Positive".

    https://github.com/mozilla/standards-positions/pull/740

    > Neutral stance: We're not convinced that the complexity this feature introduces upon the HTML parser carries its weight in terms of usefulness for web developers. There's also a risk that the processing model is not compatible with a future declarative custom elements feature as it was developed in isolation. Having said that, the proposal is a reasonable approach for this functionality that takes into account the various constraints and security considerations that come with changing the HTML parser.

    > Positive Stance: This is a reasonable proposal which takes into account the various constraints and security considerations that come with changing the HTML parser.

    Hopefully that's a sign of things to come! (Fingers crossed)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • dom

    DOM Standard

  • Thanks for the shout-out! I think I mention this in the talk, but note that YMMV. I designed that benchmark as a kind of "worst-case scenario" where shadow DOM / scoped styles really show a benefit. Depending on your CSS rules, DOM size, and amount of thrashing, the perf benefit could be small to large.

    Also, it's still possible to shoot yourself in the foot, especially if you have a large/complex stylesheet repeated across multiple shadow roots. (Not because of the repetition โ€“ that's optimized in browsers [1] โ€“ but rather because of the number of DOM nodes affected.)

    That said, I still think the perf benefits of shadow DOM have been undersung. And Declarative Shadow DOM makes it way more useful.

    [1]: https://github.com/whatwg/dom/issues/831#issuecomment-585489...

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts