Since #12241 we have notifications for this when the user navigates away from the viewer, but we do not yet warn when switching documents, which means that if you call e.g. `PDFViewerApplication.open` with a new document (or directly call `BaseViewer.setDocument` when using the viewer components standalone) there won't be any warning about losing form data. This should be addressed.
const moreInfoText = [
      this.l10n.get("error_version_info", {
        version: version || "?",
        build: build || "?",
      }),
    ];
    if (moreInfo) {
      moreInfoText.push(
        this.l10n.get("error_message", { message: moreInfo.message })
      );
      if (moreInfo.stack) {
        moreInfoText.push(
          this.l10n.get("error_stack", { stack: moreInfo.stack })
        );
      } else {
        if (moreInfo.filename) {
          moreInfoText.push(
            this.l10n.get("error_file", { file: moreInfo.filename })
          );
        }
        if (moreInfo.lineNumber) {