- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 13 Feb 2013 10:17:52 -0500
- To: public-script-coord@w3.org
On 2/13/13 10:06 AM, Adam Bergkvist wrote: > What is the correct way to represent a key-value map in WebIDL that is > to be returned from a function? Is this a key-value map with an unbounded set of possible keys? If so, > 1) A regular JavaScript object. If so, is there anything from WebIDL i > can use to describe that object? Nothing, no. You'd have to just describe it in prose. This has come up a few times; it might be good to add a WebIDL type for this. > 2) Define an interface with a getter T (DOMString propName) and describe > in text the procedure to find out if propName is valid and how to order > all names. This would work too, yes. Which one you want depends on how you want things like script changing the map to work... -Boris
Received on Wednesday, 13 February 2013 15:18:25 UTC