- From: Boris Zbarsky <notifications@github.com>
- Date: Mon, 25 Jun 2018 21:44:59 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 26 June 2018 04:45:22 UTC
Above we have two use cases described: 1. The webrtc one. This has effectively a union of dictionaries as a return value. A union of dictionaries is not expressible in idl, so it ends up using `object`. To produce the object, it takes whatever dictionary it has (which varies based on the map key string) and converts it to an object. There's no "unspecified fields" involved. 2. The keyframe case. That case is basically trying to avoid hardcoding a list of names, for efficiency reasons. The option of just doing a [[Get]] for every CSS property name by listing them all in the dictionary was in fact considered, and decided to be too slow. This _could_ be addressed by something which acts like a dictionary but also snapshots the set of property names and values on the object or something. But we have exactly one use case so far, and it's not clear that anyone else will want to do this, and if so whether they would want it to work the way the keyframe case does (e.g. ignoring prototype properties). -- 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/issues/568#issuecomment-400176939
Received on Tuesday, 26 June 2018 04:45:22 UTC