Declarative Shadow DOM

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

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. 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...

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. 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)

  4. 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

  • Entendendo renderização no browser: DOM

    1 project | dev.to | 7 Nov 2024
  • Platform Strategy and Its Discontents: The web is losing. A comeback is possible

    2 projects | news.ycombinator.com | 29 Oct 2024
  • A Response to "Have Single-Page Apps Ruined the Web?"

    3 projects | news.ycombinator.com | 25 Apr 2024
  • HTML Attributes vs. DOM Properties

    2 projects | news.ycombinator.com | 24 Apr 2024
  • Which browser do you recommend, one for personal security-focused use and one for work?

    1 project | /r/browsers | 8 Jun 2023