Re: [Bug 16450] Class String

Marcos Caceres: >> I don't believe there is a way to expose arbitrary 
internal properties from ES5
>> objects.
> Sure there is:
>    Object.isExtensible
>    Object.isSealed
>    Object.isFrozen
> I'm not really asking to get at arbitrary internal properties, just a very specific one that is defined by WebIDL…

OK, though you did say "there is a pattern to expose all internal 
properties of an object in ECMAScript5" and I don't think that is the 
case.  For example I would be very surprised if there was a plan to 
expose [[Scope]], [[Code]], etc.

> I agree. To be clear, that was not what I was asking for. What I was suggesting was that a WebIDL user agent might support something like:
> //returns true or false
> Object.isPlatformObject(obj)

OK, I understand now.  Being a platform object is something that is 
relative to a given implementation of a set of IDL fragments, so I don't 
think it's something that can be put on Object.  I am not sure that this 
would be useful enough to warrant adding, however.

Received on Tuesday, 27 March 2012 01:45:07 UTC