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: Ryosuke Niwa <rniwa@webkit.org>
Date: Fri, 11 May 2012 02:59:58 -0700
Message-ID: <CABNRm614T9dkG_CTvg+1ihB662t1kdt=NwPByWvbPfXqvG2wYw@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 Fri, May 11, 2012 at 1:55 AM, Henri Sivonen <hsivonen@iki.fi> wrote:
>
> Open question: Should it be possible to use a magic attribute on the
> first tag token to disambiguate it as MathML or SVG? xmlns="..." would
> be an obvious disambiguator, but the values are unwieldy.  Should
> xlink:href be used as a disambiguator for <a>? If the use case is
> putting tree literals in code, it probably doesn't make sense to use
> <script> or <style> (either HTML or SVG) in that kind of context
> anyway. And SVG <font> has been rejected by Mozilla and Microsoft
> anyway.
>

That sounds rather complicated and potentially surprising although I
definitely see where you're coming from.

I still think that having to create a DocumentFragment first and then
> set innerHTML on it is inconvenient and we should have a method on
> document that takes a string to parse and returns the resulting
> DocumentFragment, e.g. document.parse(string) to keep it short.
>

Yes! Can we re-use createDocumentFragment and add an optional argument
instead though?

- Ryosuke
Received on Friday, 11 May 2012 10:00:53 GMT

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