Re: [WICG/webcomponents] [declarative-custom-elements] Use case: NO-JS (Issue #1102)

sashafirsov left a comment (WICG/webcomponents#1102)

#### How DCE can improve web apps performance?

DCE parsing can be implemented by native browser HTML parser with streaming algorithm. Implementation of mozilla code for `<custom-element>` exist, other browser parsers is not a rocket science. The extending of HTML with DCE meant to be backward compatible.

The DCE declaration initialization can be done in parallel with parsing continuation. The declaration includes preparation of template, root and attributes defaults, loading dependencies, etc.

According to hydration rules, the insantiation of custom elements can be done in parallel as well. In case of "no side effect"   principle honored on standardlevel, the custom elements instantiation also can be done in parallel with html parsing and DCE declarations.

As a disclimer, no such capabilities are possible with JS.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1102#issuecomment-2811689593
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1102/2811689593@github.com>

Received on Thursday, 17 April 2025 04:16:06 UTC