W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2014

Re: [Custom]: Rename "createdCallback" to "created"

From: Ryosuke Niwa <rniwa@apple.com>
Date: Tue, 07 Oct 2014 14:43:08 -0700
Cc: (wrong string) 河内 隆仁)" <kochi@google.com>, public-webapps <public-webapps@w3.org>
Message-id: <D3D67FFF-08C1-4F4A-A490-C25CBE64DE3C@apple.com>
To: Jarek Foksa <jarek@foksa.name>
On Oct 6, 2014, at 10:21 AM, Jarek Foksa <jarek@foksa.name> wrote:

>> On 2014-10-06, at 18:24, James M. Greene <james.m.greene@gmail.com> wrote:
>> This only thing about this approach that is slightly inconsistent with the rest of the Web Platform is assuming that the `this` context within the handler will be set to the element, rather than being forced to grab it via `event.target`.
> ES6 arrow functions are going to solve the problems with this scoping inside event handlers.
> Ideally I would prefer to have a constructor instead of createdCallback(), and attach, detach and attributechange events instead of the other lifecycle callbacks. The constructor idea was already discussed here for a long time [1], but if I understand correctly it wasnt approved due to performance issues.

For the record, we don't need "an approval" from anyone to use the constructor instead of createdCallback().  As far as I understand the matter, we have never reached a consensus on this matter because we, representatives of Apple, have explicitly endorsed createdCallback() meanwhile representatives from some browser vendors have not endorsed using the constructor for custom elements.

- R. Niwa
Received on Tuesday, 7 October 2014 21:43:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:31 UTC