[Bug 18672] [Templates]: Define the behavior of cloneNode(deep) on template elements

https://www.w3.org/Bugs/Public/show_bug.cgi?id=18672

Rafael Weinstein <rafaelw@chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ojan@chromium.org

--- Comment #2 from Rafael Weinstein <rafaelw@chromium.org> 2012-09-06 18:33:17 UTC ---
So we talked locally about this further (also brought Ojan in the discussion).

There is precedent for non-attribute state which isn't cloned, which includes
scroll state and selection state.

Adam, myself and Ojan are now of the opinion that the right answer is (1) Empty
document fragment, with the following caveats:

-This probably means that if a use case is doing a deep clone, it will likely
do a parallel

df.querySelectorAll('template')

on the source and the clone, and then either clone contents or share contents,
based on its needs. Choosing option (1) doesn't make either of these the
default, and leaves open the option of later adding specific API for
HTMLTemplateElement which makes one or both of these easier

-We probably want to maintain the invariant that a template contents is inert,
and we also want to be enable sharing of content between templates, therefore
we propose making content read/write, but on write, the template enforces that
the assigned documentfragment has the correct ownerDocument (and adopts it to
the right document, if not).

Thoughts?

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 6 September 2012 18:33:24 UTC