Re: DOMString-like objects for the CSSOM

On Feb 19, 2010, at 3:53 PM, Simon Pieters wrote:

> On Fri, 19 Feb 2010 17:40:16 +0100, Boris Zbarsky <>  
> wrote:
>>> 'f' in 'x'
>>> TypeError: Cannot use 'in' operator to search for 'f' in x
>> This is more serious, since it could hinder object-detection of the  
>> new properties....
>> Thank you for bringing that up.
> It would hinder object detection using if ('px' in, but  
> object detection using if ( != undefined) would work fine.

There are lots of ways to detect, but breaking compatibility and  
breaking invariants such as ('px' in -> throw TypeError are  
not to be done lightly.

It is not clear to me why a better API needs to extend property  
reference syntax off the deep end of this pier. What's the attraction?

Conversion of number to string and back can be optimized, and is being  
optimized in competitive JS VMs.


Received on Saturday, 20 February 2010 00:36:29 UTC