W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2011

[whatwg] Declarative Inert DOM (e.g. the <template> element)

From: Adam Barth <w3c@adambarth.com>
Date: Thu, 17 Nov 2011 14:45:03 -0800
Message-ID: <CAJE5ia9682QFGBYOYWtZyw6vTGXUE12WiRyFVWKo7fxKKymxmg@mail.gmail.com>
On Thu, Nov 17, 2011 at 2:22 PM, Rafael Weinstein <rafaelw at chromium.org> wrote:
> On Thu, Nov 17, 2011 at 12:50 PM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
>> On Thu, Nov 17, 2011 at 11:15 AM, Rafael Weinstein <rafaelw at chromium.org> wrote:
>>> Big question: by what mechanism are these elements inert?
>> I like Adam's suggestion of a new document without a browsing context.
>> ?You can still move the elements into the active document and have
>> them "just work", and all the other issues are taken care of "for
>> free".
> I think that would be a fine solution. When I discussed this with
> various folks, that option came up as well, but some were concerned
> that a document might too heavy weight.
> Keep in mind that pages may have *many* <template> declarations. I'd
> expect a sophisticated page/app to have template declarations the
> hundreds if not thousands.

Have you benchmarked it?  Documents that lack browsing contexts are
actually pretty light.  Most of the "weight" comes from browsing
context.  As an example, we create and destroy a document every time
someone assigns to innerHTML.

Received on Thursday, 17 November 2011 14:45:03 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC