deblan.io-murph/assets/js/app/app.js

20 lines
322 B
JavaScript
Raw Permalink Normal View History

2022-09-08 10:26:58 +02:00
class App {
constructor(components) {
this.components = components || []
}
2022-09-08 10:26:58 +02:00
add(c) {
this.components.push(c)
2022-09-08 10:26:58 +02:00
return this
}
2022-09-08 10:26:58 +02:00
init() {
for (let u = 0, x = this.components.length; u < x; u++) {
this.components[u].init()
}
}
}
2021-03-29 19:40:55 +02:00
module.exports = App