DEV/DEV4.1/tp3/ex3/modules/loader.js

16 lines
217 B
JavaScript

class loader {
div = null
constructor(node){
this.div = node
}
set(loading){
if (loading)
this.div.classList.add("is-loading")
else
this.div.classList.remove("is-loading")
}
}
export default loader