W3C home > Mailing lists > Public > public-webapi@w3.org > March 2008

Re: [Elemement Traversal LC] why is the interface implemented as attributes in ECMASCRIPT?

From: Simon Pieters <simonp@opera.com>
Date: Fri, 07 Mar 2008 17:14:24 +0100
To: "Slim Amamou" <slim.amamou@gmail.com>, public-webapi@w3.org
Message-ID: <op.t7nl2a2kidj3kv@zcorpandell.palace.opera.no>

On Fri, 07 Mar 2008 09:48:30 +0100, 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?
>
> 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)
> - i can make a quick implementation in javascript

FWIW, I made a javascript implementation a while ago:

    http://simon.html5.org/sandbox/js/elementtraversal.js


Cheers,
-- 
Simon Pieters
Opera Software
Received on Friday, 7 March 2008 16:14:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 7 March 2008 16:14:40 GMT