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

The main points of contention in the discussion about the template element are

1) By what mechanism are its content elements 'inert'
2) Do template contents reside in the document, or outside of it

What doesn't appear to be controversial is the parser changes which
would allow the template element to have arbitrary top-level content
elements.

I'd like to propose that we add DocumentFragment.innerHTML which
parses markup into elements without a context element. This has come
up in the past, and is in itself a useful feature. The problem it
solves is allowing templating systems to create DOM from markup
without having to "sniff" the content and only innerHTML on an
appropriate parent element (Yehuda can speak more to this).

The parser changes required for this are a subset of the changes that
Dimitri uncovered here:

http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html

And I've uploaded a webkit patch which implements them here:

https://bugs.webkit.org/show_bug.cgi?id=84646

I'm hoping this is a sensible way to make progress. Thoughts?

Received on Tuesday, 24 April 2012 03:40:23 UTC