Re: [WICG/webcomponents] [templates] A declarative JavaScript templating API (Issue #1069)

sashafirsov left a comment (WICG/webcomponents#1069)

I disagree on the primitive treatment of data and their binding.

The data should reflect the scope where template is used. DCE ( declarative custom element ) for example needs access to:
* attributes
* `data-` attributes subset
* form data
* DCE payload DOM
* data slices explicitly dedicated by DCE
* event data

Note that all of above fits into generic DOM. Just as data, not a UI. It already has XPath implementation. WIth default point to attributes the expression `{attr1}` is evaluated from attribute `attr1`. XSLT has all of that. 

By keeping the primitive sygnal binding we are limiting the scope of the data. On another side, it is up to vendor to deside the mechanizm. The data DOM can be virtual and never materialize until used or at all like in case with attributes as the node value which matches the attribute would be same as the attribute in HTML DOM.
 
Concluding, there is no need to define on standards level the mechanizm, rather show the capabilities. Which are:
template+data DOM => rendered HTML 

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

Message ID: <WICG/webcomponents/issues/1069/2803747635@github.com>

Received on Tuesday, 15 April 2025 04:22:05 UTC