ember-mutation-observer
This README outlines the details of collaborating on this Ember addon.
Addon Installation
ember install ember-mutation-observer
Addon Usage
Can be used as a component like this:
{{#mutation-observer subtree=true childList=true characterData=true on-mutations=(action 'listMutations')}} <ul> {{#each list as |item|}} <li>{{item}}</li> {{/each}} </ul>{{/mutations}}
Which will pass the MutationEvents to your given function, once your list will be updated or reordered. This obviously makes the most sense when you don't have access to the given data (ex. some jQuery plugin).
Or used as a Ember.Mixin for your own components:
;;; /** * My Component * * @class MyComponent * @extends Ember.Component * @uses EmberMutationObserver.MutationObserverMixin * @public */;
Installation
git clone
this repositoryyarn
Running
ember server
- Visit your app at http://localhost:4200.
Running Tests
yarn test
(Runsember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.