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

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.


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:08 UTC