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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 9 May 2012 10:08:05 +0200
Message-ID: <CAAWBYDC6aOn_DjGX4hb_MS8SLGbvxBbM8Tz4FB_+gP2gKDxXqA@mail.gmail.com>
To: Henri Sivonen <hsivonen@iki.fi>
Cc: Rafael Weinstein <rafaelw@google.com>, Webapps WG <public-webapps@w3.org>, Yehuda Katz <wycats@gmail.com>
On Wed, May 9, 2012 at 9:52 AM, Henri Sivonen <hsivonen@iki.fi> wrote:
> Why should the programmer first create a document fragment and then
> set a property on it? Why not introduce four methods on Document that
> return a DocumentFragment: document.parseFragmentHTML (parses like
> <template>.innerHTML), document.parseFragementSVG (parses like
> <svg>.innerHTML), document.parseFragmentMathML (parses like
> <math>.innerHTML) and document.parseFragmentXML (parses like innerHTML
> in the XML mode without namespace context)? This would avoid magic for
> distinguishing HTML <a> and SVG <a>.

We want <template> to be usable with SVG (and I guess MathML, though I
have no idea how useful that would be), though.

~TJ
Received on Wednesday, 9 May 2012 08:08:58 GMT

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