Today I wanted to quickly diagnose an issue on google.com on iOS, I needed to find the event listeners that was preventing two finger double tapping a link be recognized. Web Inspector lets me toggle individual event listeners for each event, but on google.com (and other sites) they frequently addEventListener() multiple handlers for the same event. It would be a time saver if I could enable/disable or break on all event listeners for the same event. **My first thought is to recognize Option + clicking the Enable or Breakpoint checkbox for one event listener to toggle enabling or disabling the same checkbox on all event listeners for that event.**
Created attachment 375191 [details] Patch
This deserves a screenshot!
Created attachment 375216 [details] [Image] After Patch is applied
Comment on attachment 375191 [details] 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.
Comment on attachment 375191 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375191&action=review >> 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. This is for compatibility, as `eventListenerId` was added within the last year. If it's missing, we don't show the Gear menu at all.
Created attachment 375238 [details] Patch
Comment on attachment 375238 [details] Patch Clearing flags on attachment: 375238 Committed r248052: <https://trac.webkit.org/changeset/248052>
All reviewed patches have been landed. Closing bug.
<rdar://problem/53778151>
> This is for compatibility, as `eventListenerId` was added within the last > year. If it's missing, we don't show the Gear menu at all. Ohh, the makes sense thanks. This could use a COMPATIBILITY comment then.
π₯³π₯πΈπΎπ»