W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

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

From: Charles Pritchard <chuck@jumis.com>
Date: Mon, 23 Apr 2012 15:27:29 -0700
Message-ID: <4F95D751.9030400@jumis.com>
To: Dimitri Glazkov <dglazkov@chromium.org>
CC: James Graham <jgraham@opera.com>, Henri Sivonen <hsivonen@iki.fi>, public-webapps <public-webapps@w3.org>, Adam Barth <w3c@adambarth.com>, Ian Hickson <ian@hixie.ch>, Rafael Weinstein <rafaelw@google.com>, Erik Arvidsson <arv@google.com>, Yehuda Katz <wycats@gmail.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:51 GMT