Re: [w3c/webcomponents] Add an updated proposal for DOM Parts. (#899)

@rniwa commented on this pull request.



> +        }
+    }
+    for (const childNode of node.childNodes)
+        createParts(childNode, parts);
+    return parts;
+}
+```
+
+After running this code, `instance` would contain a DOM tree equivalent of:
+```html
+<section><h1 id="name"></h1>Email: <a id="link" href=""></a></section>
+```
+
+Then we can assign values to various parts we’ve just created as follows:
+```js
+updateParts(parts, {name: "Ryosuke Niwa", email: "rniwa@webkit.org", "mailAddress": "mailto:rniwa@webkit.org"})

Will fix.

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

Received on Monday, 26 October 2020 18:02:59 UTC