aframe-react-master/src/index.js
/**
 * Register event handlers to ref.
 */
Register event handlers to ref.
Register event handlers to ref .
function attachEventsToElement(el, eventMap) {
  if (!eventMap) { return; }
  Object.keys(eventMap).forEach(eventName => {
    el.addEventListener(eventName, event => {
      eventMap[eventName](event);
    });
  });
}
function attachEventsToElement ( el , eventMap ) { if ( ! eventMap ) { return ; } Object . keys ( eventMap ) . forEach ( eventName => { el . addEventListener ( eventName , event => { eventMap [ eventName ] ( event ) ; } ) ; } ) ; }
Register event handlers to ref.
Register event handlers to ref .