fxobject,
мысли вслух ...
<div id="slider">
test
</div>
<script>
class RootElement {
constructor(selector) {
this.deviceCase = document.querySelector(selector);
this.mousedown = this.fun.bind(this);
this.deviceCase.addEventListener('mousedown', this.mousedown)
}
fun(event) {
alert([this.deviceCase.id, event.type]);
this.deviceCase.removeEventListener('mousedown', this.mousedown)
}
}
new RootElement('#slider')
</script>