docs: function (config) {
              config = config || {};
              if (typeof config.useFakeFullscreen !== 'undefined') {
                  useFakeFullscreen = config.useFakeFullscreen;
              }
  
              if (viewerConfig.useWindowAsViewport) {
                  // fake fullscreen mode is redundant if the window is used as
                  // the viewport, so turn it off
                  useFakeFullscreen = false;
                  el = document.documentElement;
                  $el = $(el);
              } else {
                  if (config.element) {
                      $el = $(config.element);
                  } else {
                      $el = viewerConfig.$el;
                  }
                  el = $el[0];
              }
  
              // init browser-specific request/cancel fullscreen methods
              requestFullscreen = el.requestFullScreen ||
                                  el.requestFullscreen ||
                                  el.mozRequestFullScreen ||
                                  el.webkitRequestFullScreen ||
                                  el.msRequestFullscreen ||
                                  fakeRequestFullscreen;
  
              // fullscreen APIs are completely insane
              cancelFullscreen =  document.cancelFullScreen ||
                                  document.exitFullscreen ||
                                  document.mozCancelFullScreen ||
                                  document.webkitCancelFullScreen ||
                                  document.msExitFullscreen ||
                                  fakeCancelFullscreen;
  
              // add enter/exit fullscreen methods to the viewer API
              util.extend(viewerAPI, {
                  enterFullscreen: enterFullscreen,
                  exitFullscreen: exitFullscreen,
                  isFullscreen: isFullscreen,
                  isFullscreenSupported: isNativeFullscreenSupported
              });
  
              $(document).on(FULLSCREENCHANGE_EVENT, fullscreenchangeHandler);
          }