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.
for (const pageView of this._pages) {
      pageView.update(updateArgs);
    }
    
    
    if (this._currentScaleValue) {
      this._setScale(this._currentScaleValue, true);
    }
    this.eventBus.dispatch("rotationchanging", {
      source: this,
      pagesRotation: rotation,
      pageNumber,
    });
    if (this.defaultRenderingQueue) {
      this.update();
    }
  }
  get firstPagePromise() {
    return this.pdfDocument ? this._firstPageCapability.promise : null;
  }
  get onePageRendered() {
    return this.pdfDocument ? this._onePageRenderedCapability.promise : null;
  }
  get pagesPromise() {
    return this.pdfDocument ? this._pagesCapability.promise : null;
  }
  /**
   * Currently only *some* permissions are supported.
   */
  #initializePermissions(permissions) {