Closed smaug---- closed 2 years ago
^^ @npm1
I think it means 'If startOrMeasureOptions
is a dictionary and contains at least one of "detail", "start", "duration" or "end"'.
That's right, per https://webidl.spec.whatwg.org/#es-dictionary a dictionary is converted to an ordered map. The WebIDL also mentions empty dictionary without defining it: https://webidl.spec.whatwg.org/#:~:text=empty%20dictionary%20value. I think it could be defined and then we can use the definition, but otherwise I'm not sure what else it could mean? Is this somehow ambiguous?
That said, reading the algorithm I think we can actually remove the non-empty check: we should probably perform those checks regardless, i.e. If startOrMeasureOptions is a PerformanceMeasureOptions object
.
Never mind this check is actually required (the default value is {}
so we need to ensure that the checks are not performed in that case).
I think I can live with https://webidl.spec.whatwg.org/#es-dictionary . It is just unfortunate that it is not defined anywhere what an empty dictionary means.
@smaug---- - Maybe the best path then is to file an issue against infra, defining an empty dict there and then we can point to that definition here?
Or WebIDL -- dictionary is a concept there; infra only has the concept of an ordered map.
What is a non-empty dictionary? (Maybe it is defined somewhere, but I couldn't find it. The spec links to map's definition of empty.)