Closed prushforth closed 1 year ago
I just realized that the geometryFunction option processes and returns a geometry child element, not the geometry element. I'll update that to match the docs. Easy to fix now.
@AliyanH I think this is ready for review. Thanks!
Thanks! Merging...
WebIDL use for dictionary options that a) take > 1 type of value and b) accept functions seems challenging.
For a), such as for the
caption
option, I decided to use stringifier, which is supposed to be used to force the specification of how something that implements an interface that includes a stringifier designation should be serialized as a string. It is likely misapplied in this case, but it seems unconventional for a dictionary option to accept either a function or a string, and in the latter case to perform a lookup on the string value. It may be that such an interface is not only hard to specify, but potentially not a good interface to standardize. If that's the case, we'll have to discuss with platform experts or other interested parties on how to refine the API to be both functional and specifiable. In any case, the inclusion of the stringifier may signal that the reader should read the prose description of the interface, even though it's not 'stringification' as such.Regarding b), I opted for designating a callback function as the value of an interface attribute (as opposed to operation), so as to avoid having to assign another name to it, or perhaps it just emphasizes that the value expected to be passed is a function, as well as that it will be called by the browser because of its 'callback' designation.