function addEvents() {
    if (typeof settings.enable === 'function') {
      settings.enable = settings.enable.bind(instance)();
    }
    if (!settings.enable) {
      return; // interaction is disabled
    }
    Object.keys(settings.events).forEach((key) => {
      const listener = settings.events[key].bind(instance);
      element.addEventListener(key, listener);
      nativeEvents.push({ key, listener });
    });
  }
/**
   * Add native events based on settings
   * @private
   */
Add native events based on settings
@private
Add native events based on settings @private
function addEvents() {
    if (typeof settings.enable === 'function') {
      settings.enable = settings.enable.bind(instance)();
    }
    if (!settings.enable) {
      return; 
    }
    Object.keys(settings.events).forEach((key) => {
      const listener = settings.events[key].bind(instance);
      element.addEventListener(key, listener);
      nativeEvents.push({ key, listener });
    });
  }
function addEvents ( ) { if ( typeof settings . enable === 'function' ) { settings . enable = settings . enable . bind ( instance ) ( ) ; } if ( ! settings . enable ) { return ; } Object . keys ( settings . events ) . forEach ( ( key ) => { const listener = settings . events [ key ] . bind ( instance ) ; element . addEventListener ( key , listener ) ; nativeEvents . push ( { key , listener } ) ; } ) ; }
Add native events based on settings
 @private
Add native events based on settings @private
// interaction is disabled