- From: Bruce B. Anderson <notifications@github.com>
- Date: Fri, 10 Nov 2023 14:04:19 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/1035/1806495619@github.com>
@matthewp, >Things like loops etc are easy; you get those for free from CSS, since all selectors are "each" in CSS already. Hmm, I'm starting to wonder if you are proposing something more radical than I thought, meaning I may have to withdraw my lukewarm endorsement, not because you are wrong, but simply because I didn't fully grasp where you were going with this, and need to ponder it more carefully. What I was endorsing was just a lightweight way of mapping, from a distance, elements to "behavior", where those behaviors were still either custom or built-in JavaScript manipulation of the DOM (via DOM parts). Still within the confines that we want to clone templates for repeated content, achieve performance matching if not better than the horse race that's been going for years between different implementations of libraries that support for-each, that I never thought of as "easy" (though I never tried to compete in that horse race, so I have no idea how easy or hard it is). And then there's things like passing objects / functions to components inside the repeating content. This is all doable via css alone today? Without studying your code (do you have a white paper that goes into all the details?), I'm starting to wonder if you are suggesting we start over -- forget templates, forget beefing up the DOM API, let's instead beef up CSS so it can do everything JavaScript can do, but declaratively? Something like that? I do think that: 1) knowing when a selector changes and 2) the algorithm that determines which rule should apply at a given moment in time. something along [these lines](https://davidwalsh.name/detect-node-insertion) but more powerful, sounds useful for a variety of purposes, including, for example, a userland implementation of custom enhancements, but I'm not seeing why requesting that should preclude efforts to continue to provide better support for templates? -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1035#issuecomment-1806495619 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1035/1806495619@github.com>
Received on Friday, 10 November 2023 22:04:25 UTC