Unable to remove an (bound) event listener

后端 未结 2 405
执念已碎
执念已碎 2021-01-21 16:17

I am a newbie on javascript and I am encountering the following problem, which I wasn\'t able to find in previous answers after searching multiple times (hope this is not a dupl

2条回答
  •  隐瞒了意图╮
    2021-01-21 17:11

    Could it be that your

     .bind(this) 
    

    in

      this._div.addEventListener('mousedown', onMouseDragDown.bind(this), false);
    

    does not return the reference to the same function you are removing?

提交回复
热议问题