Re: [webcomponents] Template element parser changes => Proposal for adding DocumentFragment.innerHTML

On Fri, 11 May 2012, Tab Atkins Jr. wrote:
> 
> This solves exactly the jQuery use-case of "parse a document fragment 
> from a string".

Fantastic! Let's use it then.


> It doesn't solve the *almost* identical case of "parse the contents of a 
> <template>", because there you don't have a root element.

That's fine. We don't have to have the same solution for every problem.


> > But I'm very skeptical about creating new APIs to encourage authors to 
> > use injection-prone, non-type-checked, direct string manipulation in 
> > script to generate DOM trees.
> 
> As others have said, you've lost this race.

People said the same about <font>. I chose to be more optimistic.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 10 May 2012 23:16:45 UTC