If barcodeDetectorOptions is passed, and its formats are empty
but barcodeDetectorOptions is always passed, since it's a dictionary in trailing position: Web IDL specifies that those always have a default value.
At the same time, the "formats" member of the dictionary may not be present, but the spec doesn't handle that case. It needs to, unless that member is marked required or given a default value.
https://wicg.github.io/shape-detection-api/#dom-barcodedetector-barcodedetector says:
but
barcodeDetectorOptions
is always passed, since it's a dictionary in trailing position: Web IDL specifies that those always have a default value.At the same time, the "formats" member of the dictionary may not be present, but the spec doesn't handle that case. It needs to, unless that member is marked
required
or given a default value.