[Bug 20158] Unrestricted typed dictionary

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20158

--- Comment #13 from Anne <annevk@annevk.nl> ---
The other thing we need is unrestricted dictionaries with some preset members
for web animation. Sam Weinig dubbed these half-open dictionaries in
https://bugs.webkit.org/show_bug.cgi?id=158509#c14.

Strawman elaborate syntax:

open dictionary<keytype, valuetype> DictionaryName {
  memberType member;
}

Shorthand:

open dictionary<valuetype> DictionaryName;

would be short for

open dictionary<DOMString, valuetype> DictionaryName;

which is short for

open dictionary<DOMString, valuetype> DictionaryName {};

We could maybe leave out the open keyword and just rely the <> syntax to
indicate this. Either seems fine.

keytype should probably be restricted to string and numeric types (or just
string types).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Tuesday, 27 September 2016 16:43:43 UTC