Skip to content

Instantly share code, notes, and snippets.

@oleh-zaporozhets
Last active October 14, 2020 16:39
Show Gist options
  • Save oleh-zaporozhets/7e6a56c8bacd8ab8b6ea08cb38877ca8 to your computer and use it in GitHub Desktop.
Save oleh-zaporozhets/7e6a56c8bacd8ab8b6ea08cb38877ca8 to your computer and use it in GitHub Desktop.
on(name, listener) {
if (!this._events[name]) {
this._events[name] = [];
}
this._events[name].push(listener);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment