Here's a simple options object for a directive. When the directive is destroyed what happens to the event listener? Is it stuck in memory or is it removed?
export default {
inserted (el) {
el.addEventListener('click', function () {
console.log('Click!')
})
}
}