W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

How to represent at key-value map in WebIDL

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Wed, 13 Feb 2013 16:06:34 +0100
Message-ID: <511BABFA.9010906@ericsson.com>
To: public-script-coord@w3.org
Hello

If this isn't the right forum for this kind of question, be kind to 
direct me to the right place.

What is the correct way to represent a key-value map in WebIDL that is 
to be returned from a function? I haven't found something obvious like a 
map counterpart to sequence<T> (map<KeyT, ValueT>). Two things come to 
my mind:

1) A regular JavaScript object. If so, is there anything from WebIDL i 
can use to describe that object?

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.

Thanks

/Adam
Received on Wednesday, 13 February 2013 15:07:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:09 UTC