Re: Web Alarm API - idiomatic check

Look at the alarms api it's not obvouis how to get the id to remove an
alarm from.

```
var request = navigator.alarms.add(date, "ignoreTimezone", {
    message: "Your soup is ready!"
});
navigator.alarms.remove(request.id)
```

Should I read `request.id` to get the request? If we can only get the id
when the request resolves then it doesnt make sense to remove the alarm
once the alarm has already triggered.

It may be useful to have a recurring alarm primitive similar to setInterval.

If you want a pretty API consider parsing cron patterns (
http://crontab.org/ ) like node's cron module does (
https://github.com/ncb000gt/node-cron#another-cron-example )


On Wed, May 8, 2013 at 10:54 AM, Marcos Caceres <w3c@marcosc.com> wrote:

> Hi,
> The SysApps WG would appreciate if the JS folks could take a look at:
> http://web-alarms.sysapps.org/
> (it's nice and small, promise)
>
>
> And provide us some feedback on the idiomatic aspects (i.e., to make sure
> it isn't "another crap W3C API"™).
>
> A disclaimer: The API's name is terrible, we know that (should be called
> Web Cron or Web Scheduled Tasks or something less awful). We've tried to
> use Futures, but we are new to them.
>
> Anyway, any/all, comments welcome.  If you want to file bugs directly (or
> see what bugs we have open):
> https://github.com/sysapps/web-alarms/issues/ (
> https://github.com/sysapps/web-alarms/issues/new)
>
> Kind regards,
> Marcos
>
>
>
>
>

Received on Wednesday, 8 May 2013 18:07:39 UTC