Add event bubbling support for Infoboxes
Review Request #9306 — Created Oct. 22, 2017 and discarded — Latest diff uploaded
Currently the only mechanism to register Infoboxes is to pass in a list of elements to
InfoboxManagerView.addTargets. This creates event listeners on each individual element. This mechanism is okay when the number of elements is small, however becomes ineficient when needing to listen for events on a large number of elements.This change adds a new mechanism
addContainerSelectortoInfoboxManagerView. Instead of adding listeners to each element,addContainerSelectorregisters a single listener on the parent container which listens and triggers events for the children specified in the selector.
- Existing unit tests passed
- Two new unit tests passed
- Manual testing: created a dummy infobox type and added it to
DiffReviewableViewon all'.n'Pygments classes. Ensured events triggered when hovering over specified classes, but not when hovering over non-specified classes. This manual testing only covered themouseenterevents and not themouseleaveevents.