Getting error removeEventListner called without a function or namespace. This will remove all listeners for this event type. This is not allowed. Please specify a function or namespace to remove

Hi there,

You can always add a callback function to the original event that you are adding. And then reference that when you are removing the event.

For example, adding an event:

  const click = async (e) => {
    console.log('click');
  };
  documentViewer.addEventListener('click', click);

Removing the event:

documentViewer.removeEventListener('click', click)

Best regards,
Kevin Kim