Skip to content
This repository was archived by the owner on Jun 9, 2022. It is now read-only.
This repository was archived by the owner on Jun 9, 2022. It is now read-only.

Special lifecycle callbacks separated from other properties #47

@wilsonpage

Description

@wilsonpage

As inspired by x-tags the clear separation of lifecycle callbacks and other custom properties.

var Apple = fm.define({
  name: 'apple',
  template: template,
  lifecycle: {
    initialize: function() {},
    setup: function() {},
    teardown: function() {},
    destroy: function() {}
  },
  myAppleMethod: function() {}
});

or possible reverting to old style:

var Apple = fm.define({
  name: 'apple',
  template: template,
  onInitialize: function() {},
  onSetup: function() {},
  onTeardown: function() {},
  onDestroy: function() {}
  myAppleMethod: function() {}
});

or titled callbacks:

var Apple = fm.define({
  name: 'apple',
  template: template,
  callbacks: {
    initialize: function() {},
    setup: function() {},
    teardown: function() {},
    destroy: function() {}
  },
  myAppleMethod: function() {}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions