WICG / shape-detection-api

Detection of shapes (faces, QR codes) in images
https://wicg.github.io/shape-detection-api
Other
303 stars 35 forks source link

Language around BarcodeDetectorOptions is confused #74

Closed bzbarsky closed 5 years ago

bzbarsky commented 5 years ago

https://wicg.github.io/shape-detection-api/#dom-barcodedetector-barcodedetector says:

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.