- From: Travis Leithead <travis.leithead@microsoft.com>
- Date: Wed, 30 May 2012 19:40:59 +0000
- To: David Bruant <bruant.d@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
IE9 added a native toJSON method on the window.performance object in order to allow simple JSON of that accessor property to work nicely :)
Could be really nice to add a WebIDL syntax supporting this generally, such as how "stringifier;" is supported today.
> -----Original Message-----
> From: David Bruant [mailto:bruant.d@gmail.com]
> Sent: Wednesday, May 30, 2012 10:31 AM
> To: public-script-coord@w3.org
> Subject: [WebIDL] toJSON
>
> Hi,
>
> My reading of the current state of the spec is that
> JSON.stringify(anyEvent) is '{}' which is close to useless. This is true for any
> WebIDL compliant object.
> ECMAScript 5 introduced JSON and the toJSON property. Could it be considered
> to make something useful out of WebIDL compliant objects using this property?
>
> David
>
Received on Wednesday, 30 May 2012 19:41:40 UTC