Re: Object 'long' in DOM 2 Events

Seems like this was an oversight on our (the DOM WG's) part. There's no 
'long' in ECMAScript. Thanks for pointing this out!

Gavin Kistner wrote:
> 
> [my apologies if this is a duplicate-topic email--company's email 
> servers crashed yesterday and, not seeing an email from me in the 
> archives, I'm unsure if the original made it through]
> 
> In working on ObjJob (http://phrogz.dnsalias.net/ObjJob/) and parsing 
> the ECMAScript binding for DOM 2 Events, my parser found an object of 
> type 'long' mentioned in several locations. For example:
> 
>     The UIEvent object has the following methods:
>     initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg)
>     ... The detailArg parameter is a long object.
> 
>     The MouseEvent object has the following properties:
>     screenX ... This read-only property is a long object.
>     screenY ... This read-only property is a long object.
>     clientX ... This read-only property is a long object.
>     clientY ... This read-only property is a long object.
> 
>     -- http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html
> 
> I assume that this refers to a long integer, which is fine for the 
> specification. However, as ECMAScript does not differentiate between 
> floats and ints, having only a Number type, I believe instances of the 
> word 'long' in the ECMAScript binding should be replaced with Number.
> 
> I will certainly be doing so in ObjJob, and making a note of the 
> original spec in the comments. If this is incorrect, if I'm overlooking 
> an officially-defined 'long' object, please let me know.
> 
> -- 
> Gavin Kistner @ Refinery, Inc.
> gavin@refinery.com
> work: +1.303.444.1777
> cell: +1.303.641.1521
> 


-- 
jst

Received on Thursday, 25 September 2003 12:50:56 UTC