initCommon_() {
    // Display uncaught exceptions.  Note that this doesn't seem to work in IE.
    // See shakaDemo.Main.initWrapper for a failsafe that works for init-time
    // errors on IE.
    window.addEventListener('error', (event) => {
      const errorEvent = /** @type {!ErrorEvent} */(event);

      // Exception to the exceptions we catch: ChromeVox (screen reader) always
      // throws an error as of Chrome 73.  Screen these out since they are
      // unrelated to our application and we can't control them.
      if (errorEvent.message.includes('cvox.Api')) {
        return;
      }

      this.onError_(/** @type {!shaka.util.Error} */ (errorEvent.error));
    });

    // Display unhandled rejections.
    window.addEventListener('unhandledrejection', (event) => {
      const rejectionEvent = /** @type {!PromiseRejectionEvent} */(event);
      const message =
          `Unhandled rejection in promise: ${rejectionEvent.reason}`;
      console.error('unhandledrejection', rejectionEvent.reason,
          rejectionEvent.promise);
      this.handleError_(shaka.util.Error.Severity.CRITICAL, message, '');
    });

    // Set up event listeners.
    document.getElementById('error-display-close-button').addEventListener(
        'click', (event) => this.closeError_());

    // Set up version strings in the appropriate divs.
    this.setUpVersionStrings_();
  }
This function contains the steps of initialization that should be followed
whether or not the demo successfully set up.
@private