Closed Bug 1492497 Opened 4 years ago Closed 7 months ago
Being able to disable/re-enable an event listener for a given node
Not sure if this belongs more in the Inspector or in the Debugger panel, but in any case, that's a common need that the WebCompat diagnosis team has sent our way. Chrome let's you do half of this (just remove), but annoyingly, you have to close/open devtools to get it back.
Tom's built something like this is his debugging add-on: https://github.com/webcompat/tinker-tester-developer-spy
It can be useful, when debugging a site, to toggle event listeners, especially when there are multiple handlers set on parent nodes, etc.
This feature is planned as part of "Pause on Event" project. You might also see: https://docs.google.com/document/d/1HPTnwnYydsRBRZw3XqGoiOSaMSIeHBvKRQENm4RegPI/edit?ts=5bce6279#heading=h.532o8ksi95wv Honza
Duplicate of bug 1226637? I see one difference in that this one focuses on node events, while bug 1226637 covers all events. I guess the Events panel will also cover all events, right? Sebastian
(In reply to Sebastian Zartner [:sebo] from comment #4) > Duplicate of bug 1226637? I see one difference in that this one focuses on > node events, while bug 1226637 covers all events. I guess the Events panel > will also cover all events, right? Yes, it's duplicate This bug covers side-panel in the Inspector panel (ie listeners for the selected node/element) as well as the other bug - marked as "[inspector panel]". I'll close bug 1226637 and copy one comment from bgrins that sounds useful. Thanks! Honza
Copying over a relevant comment from bug 1226637 by :bgrins: ==== That would be pretty nice! A few thoughts: 1) I think it'd need some UX work as far as how to show disabled event listeners in the inspector / debugger. 2) There's event listener breakpoint work planned at https://github.com/devtools-html/debugger.html/issues/4750 / https://docs.google.com/document/d/1DXzoa7cUZJ_z41_QK1I1nPtyexkgGxup7C_at1SCcQs/edit. It's not the same usecase but maybe we could re-use some of the UI concepts for listing and managing listeners. 3) Would be interesting if it could be extended to any EventTarget when we allow event inspection in the console. ====
Duplicate of this bug: 1226637
See Also: → 1559813
8 months ago
Depends on: 1748431
8 months ago
Depends on: 1748631
7 months ago
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/5a82b7a2951e [devtools] Add a way to disable (and re-enable) event listener for a given node. r=ochameau,devtools-backward-compat-reviewers,bomsy.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/c4da31624b83 [devtools] Add a way to disable (and re-enable) event listener for a given node. r=ochameau,devtools-backward-compat-reviewers,bomsy.
Duplicate of this bug: 1559813
You need to log in before you can comment on or make changes to this bug.