Re: Custom elements: synchronous constructors and cloning

On Tue, Feb 24, 2015 at 12:14 AM, Anne van Kesteren <annevk@annevk.nl>
wrote:

> On Mon, Feb 23, 2015 at 11:58 PM, Ryosuke Niwa <rniwa@apple.com> wrote:
> > In that regard, perhaps what we need another option (although 4 might be
> a developer friendly superset of this):
> > 5) Don't do anything.  Custom elements will be broken upon cloning if
> there are internal states other than attributes just like cloning a canvas
> element will lose its context.
>
> Putting state in a known place as with 3 also seems okay. Although if
> anything throws there you would have to catch and ignore it. But yes,
> perhaps 5 is a good start as that is what custom elements provide for
> today...
>

Wait, what do you mean by "that is what custom elements provide for today.."

The entire pattern of template-stamping depends on the fact that custom
elements aren't broken when cloning/importing.

:DG<

Received on Tuesday, 24 February 2015 15:35:27 UTC