- From: Ryosuke Niwa <notifications@github.com>
- Date: Tue, 21 Nov 2017 00:26:03 +0000 (UTC)
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/webcomponents/pull/712/review/77966877@github.com>
rniwa requested changes on this pull request.
> @@ -397,7 +408,7 @@ The `createInstance(optional any state)` method on `HTMLTemplateElement`, when
4. Let *parts* be an empty list.
5. For every [descendent](https://dom.spec.whatwg.org/#concept-tree-descendant) node *currentNode* of *instance* in [tree order](https://dom.spec.whatwg.org/#concept-tree-order), run these steps:
1. If *currentNode* is a [template element](https://html.spec.whatwg.org/multipage/scripting.html#the-template-element):
- 1. Run the concept to _adjust single node case_ with *currentNode***.**
+ 1. Run the concept to _adjust single node case_ with *currentNode.*
`.` Should appear after *.
> shadowRoot.appendChild(template.createInstance({name: "Ryosuke Niwa", email: "rniwa@webkit.org"}));
```
When `createInstance` is called with a JavaScript object, we automatically substitute every mustache syntax with the corresponding value of the property in the object. The resultant DOM would look as though we parsed the following HTML:
-```
-<section><h1>Ryosuke Niwa</h1>Email: <a href="mailto:rniwa@webkit.org”>rniwa@webkit.org</a></section>
+``` html
+<section>
+ <h1>Ryosuke Niwa</h1>
Please don't reformat examples like this. Whitespaces after h1 Before "Email:" would not be collapsed so it would affect the final DOM tree.
> @@ -73,8 +76,11 @@ content.update({name: "Ryosuke Niwa", email: "rniwa@apple.com"});
That would update the DOM tree of the template instance to look like:
-```
-<section><h1>Ryosuke Niwa</h1>Email: <a href="mailto:rniwa@apple.com”>rniwa@apple.com</a></section>
+``` html
+<section>
+ <h1>Ryosuke Niwa</h1>
Ditto.
> @@ -85,8 +91,10 @@ Because multiple mustache syntaxes within a template work together to absorb var
In order to support use cases (4) and (5), let’s say we have the following `template` element:
-```
-<template id="foo"><div class="foo {{ f(y) }}">{{ x }} world</div></template>
+``` html
+<template id="foo">
+ <div class="foo {{ f(y) }}">{{ x }} world</div>
Ditto.
--
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/712#pullrequestreview-77966877
Received on Tuesday, 21 November 2017 00:26:30 UTC