Re: [WICG/webcomponents] [DOM Parts] Add new declarative syntax and update iterative proposal (PR #1023)

@tbondwilkinson commented on this pull request.



> +
+Allowing `{{}}` inside an attribute works the same as a
+[partial attribute update](./DOM-Parts-Imperative.md#partial-attribute-updates),
+in that it will create an `AttributePart` for the entire attribute, but it will
+have multi-valued `value` property.
+
+```html
+<template>
+  <section>
+    <h1 id="name">{{}}</h1>
+    Email: <a id="link" href="mailto:{{}}">{{}}</a>
+  </section>
+</template>
+```
+
+The `AttributePart` for `href` would have `value` equal to `['mailto:', '']`.

Oh I was imagining we would replace the value field entirely. Because otherwise you could never update what otherwise looked like a static string?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/pull/1023#discussion_r1281206602
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/pull/1023/review/1557915318@github.com>

Received on Tuesday, 1 August 2023 22:20:39 UTC