code: function setDefaultHandlers(doc, add = true) {
      if (!doc || !(doc instanceof Document)) {
          return;
      }
  
      let listenerFn = doc.addEventListener;
      if (!add) {
          listenerFn = doc.removeEventListener;
      }
  
      // iterate over all the handlers and add it as an event listener on the doc
      for (let name in handlers) {
          for (let key in handlers[name]) {
              listenerFn.call(doc, name, handlers[name][key]);
          }
      }
  }
docs: Iterates over the list of page level default handlers and set/unset listeners on the provided document.
  
  @private
  
  @param {Document} doc            The document to set/unset listeners on.
  @param {Boolean} [add=true]      Whether to add or remove listeners. Defaults to true (add)