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

As I understand it, currently, the primary purpose of DOM parts is not to make building templating solutions *easier*.  That is a secondary goal.

There's an outstanding empirical question that I think is still being investigated -- is the DOM API, as it stands, completely optimized as far as being able to perform rapid updates of DOM fragments, in every possible way? If it is, then I agree, adding superfluous API's seems unlikely to be used, unless it at least improves the developer ergonomics (the secondary goal, which I have no position on whether that is the case).  If it isn't, and there are some missing API's that could make the browser update the fragments faster, why would we not want to consider adding that to the platform?  That is the primary mission of DOM parts.  Again, if the primary mission proves to be a dud, then I agree, we should look closely at the value-add of the ergonomics of the API, and ask ourselves whether anyone outside the platform would use it.  

The answer to that question has little to no bearing on whether the platform should provide built in support for templating.  It was agreed a while ago, that we needed this empirical question looked into, first, as we don't want to build higher level functionality (like templating) on top of a sub optimal API.  Hopefully we will know the answer soon (January?), so we can move on either way.

For server rendered 100% static HTML, these API's wouldn't be very useful, I agree (just as the existing api's, such as querySelectorAll, etc. aren't very useful).  But even for extremely server-centric solutions, for example, solutions that use server sent events to update the UI, I have a hard time seeing why they wouldn't want to update the UI as fast as possible, which (we are hoping) is the primary mission of DOM parts, as I understand it.

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

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

Received on Wednesday, 8 November 2023 11:03:27 UTC