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

RE: Custom element design with ES6 classes and Element constructors

From: Domenic Denicola <d@domenic.me>
Date: Thu, 15 Jan 2015 18:09:31 +0000
To: Yehuda Katz <wycats@gmail.com>, Dimitri Glazkov <dglazkov@google.com>, Erik Arvidsson <arv@google.com>
CC: Dmitry Lomov <dslomov@chromium.org>, WebApps WG <public-webapps@w3.org>
Message-ID: <CY1PR0501MB1369FD7CF642688F051B18BDDF4E0@CY1PR0501MB1369.namprd05.prod.outlook.com>
Just to clarify, this argument for symbols is not dependent on modules. Restated, the comparison is between:

```js
class MyButton extends HTMLElement {
  createdCallback() {}
}
```

vs.

```js
class MyButton extends HTMLElement {
  [Element.create]() {}
}
```

> We're already doing some crude namespacing with *Callback. I'd expect that as soon as the first iteration of Custom Elements is out, people will copy the *Callback style in user code.

This is a powerful point that I definitely agree with. I would not be terribly surprised to find some library on the web already that asks you to create custom elements but encourages you supply a few more library-specific hooks with -Callback suffixes.

Received on Thursday, 15 January 2015 18:10:01 UTC

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