Registers a function to be called when the given element is destroyed.
An alternative way to register a destructor function is to
return
it from your compiler function.
up.compiler('.current-time', function(element) {
let update = () => element.textContent = new Date().toString()
setInterval(update, 1000)
up.destructor(element, () => clearInterval(update))
})
One or more destructor functions.