Fork me on GitHub
Mandimby Raveloarinjaka03:09:38

google attributes provider and advanced compilation When using the google attributes provider under advanced compilation 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?


(defmethod on! :hoplon.core/default
  [elem event callback]
  (events/listen elem (name event) callback))

; under advanced compilation
  ;"tg": "click",
  ;"zi": "rightclick",
  ;"Dg": "dblclick",
  ;"hg": "auxclick",
  ;"Ch": "mousedown",
  ;"Ih": "mouseup",
  ;"Hh": "mouseover",
  ;"Gh": "mouseout",