1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-05-17 14:22:02 +00:00
bramw_baserow/web-frontend/modules/core/utils/observer.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
258 B
JavaScript
Raw Permalink Normal View History

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)
}
}