- From: Marcos Caceres <w3c@marcosc.com>
- Date: Tue, 27 Mar 2012 02:34:17 +0100
- To: bugzilla@jessica.w3.org
- Cc: public-script-coord@w3.org
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