W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 7 May 2012 02:19:21 -0700
Message-ID: <CA+c2ei9JJUXqMtV4O3C3r8yq8qO-nuALdnfcmGcXJ0s0d_FVmA@mail.gmail.com>
On Mon, May 7, 2012 at 1:58 AM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
> On Mon, May 7, 2012 at 10:34 AM, Simon Pieters <simonp at opera.com> wrote:
>> On Fri, 04 May 2012 23:46:46 +0200, Ian Hickson <ian at hixie.ch> wrote:
>>> What does it do in the case of:
>>>
>>> ? var frag = document.createDocumentFragment();
>>> ? frag.innerHTML = 'bla bla .. 1GB of text .. bla <caption> bla' ?
>>
>> When hitting non-whitespace text, it seems better to use "in body", I think.
>
> That's potentially usable, since having non-whitespace inside a table
> is erroneous anyway. ?However, it's less compatible with the <ruby>
> modes, as <ruby> can contain raw text. ?Is that okay?

As long as all tokenization happens the same way both when scanning
for the first element, and when the tree building is happening, then
it should matter if there is 1GB of content before the element. It
would just need to be tokenized once anyway.

/ Jonas
Received on Monday, 7 May 2012 02:19:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT