Using objects for a mapping argument

Hi all, Tab and Anne suggested I ask about a use of objects here.

defines some arguments to a function in which I want users to express
a map from integers or strings to a dictionary. One of the arguments
will look like {0x004C: {dataPrefix: [0x02, 0x15]}}, while the other
could be {0xFEAA: {dataPrefix: [0x10]}, "battery_service": {}}.

This is processed at
using explicit calls to `.[[OwnPropertyKeys]]()` and some other
ECMAScript operations.

Does this make sense, or should I have my users express these
arguments in some other way?

If this makes sense, would you like me to propose some WebIDL
operations that would make it easier?


Received on Saturday, 24 September 2016 01:23:55 UTC