Listening to custom (not jQuery) events

How would I listen to custom JS events emitted by third-party code? I want to listen to Quill events

Have reviewed jQuery events and callbacks but they both seem a bit hacky. = {
  EDITOR_CHANGE        : 'editor-change',
  SCROLL_BEFORE_UPDATE : 'scroll-before-update',
  SCROLL_OPTIMIZE      : 'scroll-optimize',
  SCROLL_UPDATE        : 'scroll-update',
  SELECTION_CHANGE     : 'selection-change',
  TEXT_CHANGE          : 'text-change'
Emitter.sources = {
  API    : 'api',
  SILENT : 'silent',
  USER   : 'user'

export default Emitter;

Javan wrote about this in his post in this thread: One of two actions on same element not being called