- From: Matthew Phillips <notifications@github.com>
- Date: Thu, 02 Nov 2017 15:47:41 +0000 (UTC)
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 2 November 2017 15:48:06 UTC
The disadvantage to choosing the same syntax as JavaScript is that it makes it more difficult to create templates as template literals *in* JavaScript (you have to remember to escape them all). For ex:
```js
template.innerHTML = `
<h1>\${name}</h1>
<h2>${title}</h2>
`;
```
Would throw assuming `title` is not in scope b/c you forgot to escape it. If it were in scope you might be scratching your head as to why the templates were not behaving as you expected.
--
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/issues/688#issuecomment-341465220
Received on Thursday, 2 November 2017 15:48:06 UTC