Re: [WICG/webcomponents] DOM parts use outside of <template> seems unlikely (Issue #1035)

@bahrus 

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

I'm sorry to hear that, I didn't want to present a counter-proposal because I'm always afraid that it becomes a binary (a) or (b) choice and I don't believe in that. I only presented this CSS-like idea because @EisenbergEffect asked for pseudo-code to understand what I meant.

I think CSS-like is an interesting approach that has some historical background, but I'm equally open to any other proposal so long as it:

1. Decouples binding from HTML creation.
2. Does not favor any particular backend.

> 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?

That is one interesting approach that I think is worth investigating more, yes. Note that `<template>` is still very useful in this approach, but template as it exists *today*, without any magic symbols or interpolation. It's useful as a way to clone a chunk of HTML that you think manipulate via a CSS-like DSL.

> 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?

Because it's a competing idea, and in my history observing the platform I've never seen 2 competing ideas being worked on at the same time. If we continue down the template path, any other idea is going to left in the back burner for a very long time, and if templates are even moderately successful, will never be given a chance at all. So I see this as an inflection point in which it's important to fully analyze all possibilities before moving forward.

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

Message ID: <WICG/webcomponents/issues/1035/1806520234@github.com>

Received on Friday, 10 November 2023 22:32:18 UTC