- From: Justin Fagnani <notifications@github.com>
- Date: Thu, 03 Aug 2023 12:14:55 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 3 August 2023 19:15:01 UTC
Another important point is that the syntax is also an instruction to the browser and may very well not be directly exposed to all users. In my world, Lit-style templates would still use JS template literals with standard JS syntax, but be able to very easily use the browser's syntax to create an HTML template with parts: ```ts const makeTemplate = (strings) => { const template = document.createElement('template'); template.setAttribute('parseparts', ''); template.innerHTML = strings.join('{{}}'); return template; ``` The import part here is that the delimiter ('{{}}') is valid in attribute position, which rules out elements and comments. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/pull/1023#issuecomment-1664499376 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/pull/1023/c1664499376@github.com>
Received on Thursday, 3 August 2023 19:15:01 UTC