- From: Frederik Bosch <notifications@github.com>
- Date: Sat, 30 Aug 2025 05:16:21 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/1112@github.com>
frederikbosch created an issue (WICG/webcomponents#1112) As per the request of @justinfagnani in [the thread on use cases of DCE](https://github.com/WICG/webcomponents/issues/1099#issuecomment-2806351683), I create a separate issue for the progressive enhancement DCE use case. We use declarative custom elements as replacement for the previous classical example of progressive enhancement: DOMContentLoaded + query selector + action, where the action is attaching an event listener or directly modifying the content on the element. Especially when you administrate many websites, you create reusable components that can be embedded in any website because custom elements are isolated. There are no cascading CSS side-effects. So, custom elements can be inserted in websites made many years ago, without having to check surrounding code. So, it solves gradually replacing legacy code. Typical examples are: - website navigation - user login / avatar - user preferences - badges (unread messages) - sliders and marquee-alike objects It involves elements that cannot have a FOUC, hence my interest in [Declarative Shadow DOM adopted stylesheets](https://github.com/whatwg/html/issues/10673), because they are essential elements that need to look good on first render and have their additional behavior progressively attached. Moreover, these elements need to indexed by search engines and therefore their full markup must be part of the page. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1112 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1112@github.com>
Received on Saturday, 30 August 2025 12:16:25 UTC