Re: [webcomponents] HTML Parsing and the <template> element

<script type=text/html> works for string-based templating. Special handling
of </script> is not a big enough pain to justify adding a template element.

For Web Components and template systems that want to do DOM based
templating (e.g. MDV), the template element can meet that need much better
than a string-based approach. If nothing else, it's more efficient (e.g. it
only parses the HTML once instead of for each instantiation of the
template).

String-based templating already works. We don't need new API for it.
DOM-based templating and Web Components do need new API in order to work at
all. There's no need, and little benefit, for the template element to try
to meet both use-cases.

Ojan

On Wed, Apr 25, 2012 at 3:20 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Wed, Apr 25, 2012 at 3:17 PM, Brian Kardell <bkardell@gmail.com> wrote:
> > And when that becomes the case, then using the source text becomes
> > "problematic" not just "less efficient" right?
>
> Yes, for exactly the reasons you can't nest <script>s.
>
> ~TJ
>
>

Received on Wednesday, 25 April 2012 22:32:09 UTC