0.4.0 • Published 4 years ago

element-controller v0.4.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

ElementController · GitHub license npm version

Simple UI controller with Backbone.js inspired event delegation.

Installation

npm install element-controller

Example usage

import ElementController from 'element-controller';

// new CommentController(commentsContainerElement)
export default class CommentController extends ElementController {

  getDOMEventHandlerStrings() {
    return [
      'click .comment > .btn-delete: onDeleteCommentClick',
      'focusin .comment: onCommentFocus',
      'click .comment: onCommentClick'
    ];
  }

  onDeleteCommentClick() {
    /* delete handler */
  }

  onCommentFocus() {
    /* focus handler */
  }

  onCommentClick() {
    /* click handler */
  }

}

Change log

0.4.0

  • Dependency updates

0.3.1

  • Bugfix

0.3.0

  • Dev env config and dependency updates (eslint, babel, resolve-handlers).

0.2.0

  • Updated dependencies

License

This software is licensed under the MIT License.

0.4.0

4 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago