- From: David Flanagan <david@oreilly.com>
- Date: Fri, 17 Aug 2001 08:51:56 -0700
- To: keshlam@us.ibm.com
- CC: www-dom@w3.org
> Beware assumptions. We never stated the language, as far as I can tell, and > note that what Java calls getFirstChild() _is_ just called firstChild() in > the ECMAScript bindings, due to different local naming conventions. In ECMAScript (JavaScript), it would simply be firstChild, with no parentheses. > I honestly dont't know whether this code would be acceptable ECMAScript > either -- I can read that language but haven't written it. No, it wouldn't be acceptable ECMAScript either, because in that binding firstChild and nextSibling are properties, not methods. Also, the code includes variable declarations using Java syntax, not JavaScript syntax. The code isn't valid Java or JavaScript, and I think it is fair to say that it would not be valid in any binding. The firstChild and nextSibling attributes in the IDL either need to be mapped to properties, or to methods. But, if they are mapped to methods, they really need to have their names changed to indicate whether they are getter or setter methods. So I think these should be getFirstChild() and getNextSibling() David
Received on Friday, 17 August 2001 12:46:01 UTC