code: function setHandlers(doc, cfg, add = true) {
      if (add) {
          addDefaultHandlers(doc);
          addListeners(doc, cfg);    
      } else {
          removeDefaultHandlers(doc);
          removeListeners(doc, cfg);
      }
  }
docs: Sets/unsets the event handlers as per the event configuration.
  Also adds/removes the [default page level handlers]{@link handlers}.
  
  @private
  
  @param {Document}  doc           The page document.
  @param {Obejct}  cfg             Page configuration object
  @param {Boolean} [add=true]      Whether to add or remove the handlers