1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-21 23:37:55 +00:00
bramw_baserow/web-frontend/modules/core/utils/observer.js
2020-03-27 13:19:43 +00:00

20 lines
258 B
JavaScript

export class Observer {
constructor() {
this.clear()
}
clear() {
this.events = []
}
fire(...args) {
for (const event in this.events) {
this.events[event](...args)
}
}
register(event) {
this.events.push(event)
}
}