On Wednesday, 21 March 2012 at 22:51, bugzilla@jessica.w3.org (mailto:bugzilla@jessica.w3.org) wrote: > 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… Having said that, I guess it might be complicated because this would need to be added for all existing objects with a fairly weak use case. > I define the class string solely to avoid redefining [[Class]], to make it > possible for pure JS implementations to have Object.prototype.toString behave > appropriately. I think at some point ECMAScript is going to gain an internal > property like this, but I don't think they have done so yet. When they do, we > can rewrite Web IDL to use that rather having the "class string" definition. > Ok. > I don't think it makes sense to have all platform objects return "[object > Platform]". > 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)Received on Tuesday, 27 March 2012 01:34:49 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:06 UTC