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

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

From: Jarek Foksa <jarek@foksa.name>
Date: Wed, 1 Oct 2014 20:09:33 +0200
Message-Id: <19EE0D66-AE2F-41EC-AAB5-CF1F9A6C4D3E@foksa.name>
To: public-webapps@w3.org
Custom elements spec defines following lifycycle callbacks:

- createdCallback()
- attachedCallback()
- detachedCallback()
- attributeChangedCallback()

I'm wondering what was the reasoning behind the naming convention used here, it feels verbose and inconsistent with the rest of the Web Platform. Even Polymer authors, which I thought were also contributing to the spec, decided to drop the "callback" postfix.

The postfix doesn't add any additional information. If method name states what has happened (“created”, “attached”) rather than what should happen (“create”, “attach”) then it’s obvious that such method is a callback.
Received on Wednesday, 1 October 2014 18:09:58 UTC

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