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

Re: Custom elements: synchronous constructors and cloning

From: Dimitri Glazkov <dglazkov@google.com>
Date: Tue, 24 Feb 2015 07:35:00 -0800
Message-ID: <CADh5Ky334TXvmxoUvEQ5O2L8BqKAwzbyTSDZW5zsk7ncbAGi1g@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Ryosuke Niwa <rniwa@apple.com>, Boris Zbarsky <bzbarsky@mit.edu>, WebApps WG <public-webapps@w3.org>, Yehuda Katz <wycats@gmail.com>
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

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:25 UTC