Re: [Alarm API] Object data must be serialisable to JSON

Using Object here is not correct since we want to allow passing
strings, numbers and booleans too. I.e. we want to support passing
anything which can be serialized as JSON.

So instead the third argument should be "optional any data".

/ Jonas

On Mon, Feb 11, 2013 at 2:22 PM, Marcos Caceres
<marcosscaceres@gmail.com> wrote:
> The spec says:
>> > AlarmRequest add(Date date, TimezoneDirective respectTimezone, optional Object data);
>
> This has been raised before, but the definition of "data" is not quite right. It's not so much that data is a [Web IDL] Object (that would be all objects that inherit from Object, including Window I guess), but that data needs to be serialisable to a JSON string. I don't know what the right WebIDL is for specifying that (if it's even possible, but I've asked on public-script-coord@w3.org [1]). It might just have to be defined in prose a bit better.
>
>
>
>
> [1] http://lists.w3.org/Archives/Public/public-script-coord/2013JanMar/0130.html--
> Marcos Caceres
> http://datadriven.com.au
>
>
>

Received on Friday, 15 February 2013 04:48:11 UTC