folium
folium copied to clipboard
Add EventHandler to layer object
In combination with JsCode this makes it easier for users to add on method calls for event handling without extending Folium itself.
The functionality was inspired by PR #1866 by @yschopfer19. The PR was not accepted yet, because of concerns with code duplication. In the approach taken in the current PR, #1866 would not be necessary anymore, as the requested changes could be added completely in client code space.