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

On 4/18/2012 2:54 PM, Dimitri Glazkov wrote:
>> >  I am also pretty scared of tokenising stuff like it is markup but then
>> >  sticking it into a different document. It seems like very surprising
>> >  behaviour. Have you considered (and this may be a very bad idea) exposing
>> >  the markup inside the template as a text node, but exposing the
>> >  corresponding DOM as an IDL attribute on the HTMLTemplateElement (or
>> >  whatever it's called) interface?
> This seems like a neat idea -- though I haven't thought about this in depth yet.

What about: <template id="template"><noscript>My <mySpecialTags /> and 
template!</noscript></template>
template.shadowRoot.firstChild.nextSibling.tagName == 'MYSPECIALTAGS';

Given how much time templates would save me in development, I am 
completely fine with the extra <noscript> tag and .shadowRoot accessor.

-Charles

Received on Monday, 23 April 2012 22:27:53 UTC