google attributes provider and advanced compilation When using the google attributes provider under advanced compilation goog.events.EventType keys are renamed. As a result the code trying to listen for an event throws an "Invalid event type" exception. I have changed the code to mimic what is done for the jquery attributes provider that let the client codeline make sure that the event type is correct. It seems to work whatever the optimization level is. Am I missing something or is there a real bug that needs to be addressed?
;goog.cljs
(defmethod on! :hoplon.core/default
[elem event callback]
(events/listen elem (name event) callback))
;goog.events.EventType under advanced compilation
;{
;"tg": "click",
;"zi": "rightclick",
;"Dg": "dblclick",
;"hg": "auxclick",
;"Ch": "mousedown",
;"Ih": "mouseup",
;"Hh": "mouseover",
;"Gh": "mouseout",
...
;}
I have added the patch to a starter project: https://github.com/mraveloarinjaka/hello-world-hoplon-shadow-cljs/blob/patching_goog/src/lib/hoplon/goog.cljs