Use Chrome's webkit inspector to remove an event listener

后端 未结 5 1397
不知归路
不知归路 2020-12-29 07:28

I know you can see the event listeners in the Chrome Inspector but i\'m doing some debugging work and there are so many event listeners lying around I\'d like to disable som

5条回答
  •  伪装坚强ぢ
    2020-12-29 08:15

    Simply:

    getEventListeners(document).click[0].remove()
    

    This works with other elements, too:

    getEventListeners($('#submit-button')[0]).click[0].remove()
    

    And other types of events:

    getEventListeners($('#login-form')[0]).submit[0].remove()
    

提交回复
热议问题