- From: Ryosuke Niwa <notifications@github.com>
- Date: Mon, 26 Oct 2020 11:03:59 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 26 October 2020 18:04:13 UTC
@rniwa commented on this pull request. > +and `AttributePart` for [`a` element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element) as follows: +```js +namePart = new ChildNodePart(name) +emailPart = new ChildNodePart(link) +emailAttributePart = new AttributePart(link, ’href’) + +Then assigning values as follows will update the DOM: +namePart.value = "Ryosuke Niwa" +emailPart.value = "rniwa@webkit.org" +emailAttributePart.value = "mailto:rniwa@webkit.org" +``` + +The resultant DOM will look like this: +```html +<section><h1 id="name">Ryosuke Niwa</h1>Email: <a id="link" href="mailto:rniwa@webkit.org"></a></section> +``` Oh oops, that's because I forgot to add calls to `commit()`. 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_r512164486
Received on Monday, 26 October 2020 18:04:13 UTC