We could use:
https://github.com/mozilla/pdf.js/blob/c3d08580627471432a6ad0b2fdb948df64126afa/src/display/api.js#L929

and look at bit 4.

The following pdf:
https://orimi.com/pdf-test.pdf
is not editable in neither Acrobat nor Edge nor Foxit and nor Okular.
appConfig.toolbar.viewFind.classList.add("hidden");
  }
  if (PDFViewerApplication.pdfViewer.enableAnnotationEditor) {
    appConfig.toolbar.editorModeButtons.classList.remove("hidden");
  }
  appConfig.mainContainer.addEventListener(
    "transitionend",
    function (evt) {
      if (evt.target ===  this) {
        eventBus.dispatch("resize", { source: this });
      }
    },
    true
  );
  try {
    if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
      if (file) {
        PDFViewerApplication.open(file);
      } else {
        PDFViewerApplication._hideViewBookmark();
      }
    } else if (PDFJSDev.test("MOZCENTRAL || CHROME")) {
      PDFViewerApplication.setTitleUsingUrl(file,  file);
      PDFViewerApplication.initPassiveLoading();
    } else {
      throw new Error("Not implemented: webViewerInitialized");
    }
  } catch (reason) {
    PDFViewerApplication.l10n.get("loading_error").then(msg => {
      PDFViewerApplication._documentError(msg, reason);