Re: Web Alarm API - idiomatic check

On Wednesday, May 8, 2013 at 7:07 PM, Jake Verbaten wrote:

> 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( (
> ```
> Should I read ` (` 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.

Oh, d'oh! the example is using the old API :( Really sorry about that. Filed a bug:

> It may be useful to have a recurring alarm primitive similar to setInterval.
> If you want a pretty API consider parsing cron patterns ( ) like node's cron module does ( )
Those links are super helpful, thanks! Filed a bug to add that as potential enhancement: 

I'm sure there are a ton of use cases. 

Received on Thursday, 9 May 2013 20:30:14 UTC