[webkit-reviews] review granted: [Bug 200233] Web Inspector: DOM: provide a way to disable/breakpoint all event listeners for a given DOM node or event type : [Attachment 375191] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 31 11:53:15 PDT 2019
Joseph Pecoraro <joepeck at webkit.org> has granted Devin Rousso
<drousso at apple.com>'s request for review:
Bug 200233: Web Inspector: DOM: provide a way to disable/breakpoint all event
listeners for a given DOM node or event type
https://bugs.webkit.org/show_bug.cgi?id=200233
Attachment 375191: Patch
https://bugs.webkit.org/attachment.cgi?id=375191&action=review
--- Comment #4 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 375191
--> https://bugs.webkit.org/attachment.cgi?id=375191
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=375191&action=review
Nice! r=me
> Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js:82
> + return !!InspectorBackend.domains.DOM &&
!!InspectorBackend.domains.DOM.setEventListenerDisabled;
This could be written as:
return !!(InspectorBackend.domains.DOM &&
InspectorBackend.domains.DOM.setEventListenerDisabled)
To avoid too many !s
> Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js:87
> + return !!InspectorBackend.domains.DOM &&
!!InspectorBackend.domains.DOM.setBreakpointForEventListener &&
!!InspectorBackend.domains.DOM.removeBreakpointForEventListener;
Ditto
> Source/WebInspectorUI/UserInterface/Views/EventListenerSectionGroup.js:98
> + return !!this._eventListener.eventListenerId;
Hmm, when does this happen? It seems that if this happens then the Gear menu
will only ever show "Disable Event Listeners" because this one can not be
disabled.
More information about the webkit-reviews
mailing list