- From: liorean <liorean@gmail.com>
- Date: Fri, 7 Mar 2008 16:59:38 +0100
- To: "Web APIs WG (public)" <public-webapi@w3.org>
On 07/03/2008, Slim Amamou <slim.amamou@gmail.com> wrote: > hi, > the ElementTraversal interface is bound to readonly attributes in > ecmascript, whereas it is bound to methods in java. > why? Because having things like this as as properties is normal the ECMAScript way, but having getter and setter functions is the normal Java way. > it would be more convenient if it was bound to methods in ecmascript either. > i can think of two arguments for this : > - the bindings will be more consistent (so that you don't have > "getChildElementCount" and "childElementCount" representing the same > binding) Having getter and setter functions using method syntax is a distinctly foreign way of doing this in JavaScript. Plus, these properties analogously match the way it's done for the node traversal bindings in our earlier DOM versions. And thirdly, those would be two different bindings to the same functionality, not the same binding. Really, I think the DOM is too Java-istic from an ECMAScript perspective already, and intra-language bindings coherency is more important than inter-language bindings coherency. -- David "liorean" Andersson
Received on Friday, 7 March 2008 15:59:48 UTC