You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
288 B

  1. window.addons = {
  2. addons: [],
  3. events: null,
  4. register: function (addon) {
  5. this.addons.push(addon);
  6. if (this.events)
  7. addon.init(this.events);
  8. },
  9. init: function (events) {
  10. this.events = events;
  11. this.addons.forEach(function (m) {
  12. m.init(this.events);
  13. }, this);
  14. }
  15. };