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 addContainerSelector
to InfoboxManagerView
. Instead of adding listeners to each element, addContainerSelector
registers a single listener on the parent container which listens and triggers events for the children specified in the selector.