I feel like they are more like Lifecycle Hooks or Lifecycle Phases... So naming would make more sense as createdPhase or createdHook
- Matthew Robb On Mon, Oct 6, 2014 at 11:08 AM, Jarek Foksa <[email protected]> wrote: > > > On 2014-10-06, at 12:32, Takayoshi Kochi (河内 隆仁) <[email protected]> > wrote: > > > > What I learned from people around me is that these names have "Callback" > suffixes because > > - to indicate that it is for a callback function and not a callable API > > - it is low-level API and had to use non-trivial name > > > > So even it doesn't seem to add any information, the suffix has some > meaning by existing there. > > > Every API, no matter whether low or high level, should use descriptive and > semantic names. > > I don't think it's a good idea to change the semantics of the word > "callback" when used in context of a custom element. The term "callback" > does not mean "a function that is not a callable API". > > Maybe the term "delegate" would be more semantic here? Another idea is to > use “host” postfix (e.g. createdHost) which at least provides some > additional information instead of repeating obvious fact. > > > > On 2014-10-06, at 12:32, Takayoshi Kochi (河内 隆仁) <[email protected]> > wrote: > > > > I'm concerned about what you said about "inconsistent with the rest of > the Web Platform". What are examples of the rest? > > I meant the on<eventname> naming convention used by DOM event callbacks > (e.g. onclick, onfocus). After having though about it second time, this > convention is really obscure and it's probably not worth following unless > lifcycle events will be supported in future. > > >
