W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: Review of the <template> spec

From: Rafael Weinstein <rafaelw@google.com>
Date: Thu, 24 Jan 2013 09:43:35 -0800
Message-ID: <CABMdHiRi21-3=RZwqNQ90s8+RbDdwOGEPkeOxPRbECZWd27n9A@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Simon Pieters <simonp@opera.com>, Henri Sivonen <hsivonen@iki.fi>, public-webapps WG <public-webapps@w3.org>
Note that the spec has moved to FPWD, all of the comments Henri raised have
been addressed and WebKit TOT now contains a full implementation including
tests.

On Fri, Dec 21, 2012 at 1:31 PM, Rafael Weinstein <rafaelw@google.com>wrote:

>
>
> On Fri, Dec 14, 2012 at 2:58 PM, Jonas Sicking <jonas@sicking.cc> wrote:
>
>> On Fri, Dec 14, 2012 at 1:32 AM, Simon Pieters <simonp@opera.com> wrote:
>> > On Fri, 14 Dec 2012 00:04:20 +0100, Jonas Sicking <jonas@sicking.cc>
>> wrote:
>> >
>> >> On Tue, Dec 11, 2012 at 5:00 AM, Henri Sivonen <hsivonen@iki.fi>
>> wrote:
>> >>>>
>> >>>> 1. If DOCUMENT does not have a browsing context, Let TEMPLATE
>> CONTENTS
>> >>>> OWNER be DOCUMENT and abort these steps.
>> >>>> 2. Otherwise, Let TEMPLATE CONTENTS OWNER be a new Document node that
>> >>>> does not have a browsing context.
>> >>>
>> >>>
>> >>> Is there a big win from this inconsistency? Why not always have a
>> >>> separate doc as the template contents owner?
>>
>
> My goal was to *only* have one separate doc per "normal" doc. Consider the
> following:
>
> <body>
>   <div id=a>
>   <template id=1>
>     <div id=b>
>     <template id=2>
>       <div id=c>
>     <template>
>   </template>
> </body>
>
> The "if document does not have a browsing context" part is needed by
> template 2 so its contents can be owned by the same document as template
> 1's contents. I.e. for each document with a browsing context, there is a
> single (lazily created) template contents owner which is shared by all
> templates reachable from the "main" document's documentElement.
>
> I'm open to other ways of accomplishing the same thing, but like Jonas,
> I'm mainly concerned here with minimizing the number of "extra" documents
> which need to be constructed to owner template contents.
>
>
>> >>
>> >>
>> >> Or why not always use the owner document of the <template> element?
>> >
>> >
>> > I think that would cause things like <img> elements to load.
>>
>
> Correct. Remember that we've already agreed that the mechanism for
> template contents "inertness" is that the content document fragment (and
> all of its descendants) are owned by a document which does not have a
> browsing context.
>
>
>>
>> True. Though I wonder if that can be solved in other ways. Should be
>> relatively easy to fix in Gecko, though I don't know about other
>> implementations of course.
>>
>> Seems unfortunate to add the wonkyness of separate owner documents
>> just to overcome this hurdle.
>
>
>
>> / Jonas
>>
>
>
Received on Thursday, 24 January 2013 17:44:04 GMT

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