- From: Joe Taber <notifications@github.com>
- Date: Wed, 27 Mar 2024 12:15:28 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/1255/2023780520@github.com>
I think there are two things here: 1. The DOM needs a new fundamental capability that it never had before, i.e. `insertBeforeAtomic` 2. If an app is composed from multiple separate components they will need to coordinate around how to use `insertBeforeAtomic`. 1 must be solved by adding a new DOM api to the spec. IMO, 2 should be the developer's responsibility to manage for now, and adding attributes to allow elements to control how they are swapped should be a separate feature request and discussion. If a page is designed around components that expect some convention wrt how it coordinates use of the new API that's fine, but that doesn't need to be baked into the spec right now, for two reasons: * It dramatically increases the scope of this feature. Just the debate of exactly what the semantics of the attribute should be, how it applies to different node types, etc could burn a lot of time. * We don't even know how components will need to coordinate. I don't particularly mind the `preserve` attribute approach, but I'm not fully convinced that this is the correct API to permanently bake into the DOM either. We've never had `insertBeforeAtomic` before, so we could just guess what the best API is to coordinate use of it and bake it into the spec and cross our fingers that we got it right, or we could wait until the new feature has some mileage in real apps and consider adding something based on what authors have learned from experience. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/1255#issuecomment-2023780520 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/1255/2023780520@github.com>
Received on Wednesday, 27 March 2024 19:15:32 UTC