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

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

From: Rafael Weinstein <rafaelw@google.com>
Date: Mon, 23 Apr 2012 20:39:54 -0700
Message-ID: <CABMdHiRqqDa_npD_YAoQDrP7FubG8rbEY7B0qwJJcqhBSyruiA@mail.gmail.com>
To: Webapps WG <public-webapps@w3.org>
Cc: Yehuda Katz <wycats@gmail.com>
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

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:


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


I'm hoping this is a sensible way to make progress. Thoughts?
Received on Tuesday, 24 April 2012 03:40:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:33 UTC