The problem with the current supportedFormats attribute are two-fold,
The property can be read synchronously which is incompatible with modern user agent designs which run script in a sandboxed process and so would have to cache the value of this attribute at startup in order to provide its value synchronously or pause script execution until it can be fetched asynchronously.
While a developer can select the barcode formats they would like to use through BarcodeDetectorOptions they must first create a new BarcodeDetector in order to get access to this property.
This attribute should instead be (a) static and (b) a method returning a Promise.
The problem with the current supportedFormats attribute are two-fold,
This attribute should instead be (a) static and (b) a method returning a Promise.