How to remove specify listener in js (not written by yourself)

problem description

in the chrome console, you can see the relevant listener under mousemove (there are three listener, that can be deleted or only the one I specified).

the environmental background of the problems and what methods you have tried

element.removeEventListener can delete listener, but the second parameter is the listener, to be removed. I don"t know how to get

.
Nov.11,2021

if listener is an anonymous function, it cannot be removed. If listener is not an anonymous function, you can see the function name through the browser's devtool, and then delete


there is getEventListeners, under

chrome. Other browsers should not have

.
Menu