- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Thu, 10 Jul 2014 12:09:51 -0400
- To: Rik Cabanier <cabanier@gmail.com>, Domenic Denicola <domenic@domenicdenicola.com>
- CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
On 7/10/14, 10:55 AM, Rik Cabanier wrote: > What if instead of interfaces, we just define them as dictionaries: The JS reflection of a dictionary (what you get after converting a Web IDL dictionary to a JS value) is an object with some value properties. > Object.defineProperty(this.bounds, 'left', { enumerable: > true,get: function() { > return Math.min(Math.min(self.p1.x, self.p2.x), Math.min(self.p3.x, > self.p4.x)); > } }); So that's not a dictionary. Furthermore, why is it a good idea to have these getters on a per-instance basis instead of on a shared prototype? -Boris
Received on Thursday, 10 July 2014 16:10:21 UTC