- From: Boris Zbarsky <notifications@github.com>
- Date: Fri, 30 Sep 2016 13:51:47 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Message-ID: <heycam/webidl/pull/180/review/2400311@github.com>
bzbarsky commented on this pull request. > + let obj = {__proto__: proto, d: 5, c: 6} + Object.defineProperty(obj, "e", {value: 7, enumerable: false}); + let result = identity(obj); + assert(result.a === undefined); + assert(result.b === undefined); + assert(result.e === undefined); + let entries = Object.entries(result); + assert(entries[0][0] === "d"); + assert(entries[0][1] === "5"); + assert(entries[1][0] === "c"); + assert(entries[1][1] === "6"); + </pre> + + Dictionary keys and values can be constrained, although keys can only be + constrained among the three string types. The following conversions all + throw {{TypeError}}s: Conversion to ByteString will throw if one of the 16-bit code units in the string is larger than 255. But yes, the other two examples here would not throw: USVString just sticks in a replacement char and converting a random object to an integer type will produce 0. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/pull/180
Received on Friday, 30 September 2016 20:52:17 UTC