remove event listener of ref code example
Example: removeeventlistener
// type function
element.removeEventListener("mousedown", handleMouseDown)
// full type list available here: https://developer.mozilla.org/en-US/docs/Web/Events