Updated based on meeting notes from 21 May 2026.
Background
Currently alarms.create() takes two optional arguments, alarmName and alarmInfo:
alarms.create(
name, // optional string
alarmInfo // optional object
)
If caller omits name, then it is assumed to be an empty string "".
Proposal
The split of arguments into two different arguments is not ergonomic.
I propose adding an optional attribute name to alarmInfo so that the following calls are equivalent:
alarms.create("kettle", {delayInMinutes: 1.5});
alarms.create({name: "kettle", delayInMinutes: 1.5});
If both places specify the same name, no behavior change is needed. If both places specify different names, then an error is thrown because the intention of the caller is not clear.
Backwards compatibility
This behavior is trivially polyfillable. It's just a bit of syntactic sugar for developer convenience.
The new syntax will likely apply the new alarm length limit unconditionally, so it will not be backwards-compatible.
Updated based on meeting notes from 21 May 2026.
Background
Currently
alarms.create()takes two optional arguments,alarmNameandalarmInfo:If caller omits
name, then it is assumed to be an empty string"".Proposal
The split of arguments into two different arguments is not ergonomic.
I propose adding an optional attribute
nametoalarmInfoso that the following calls are equivalent:If both places specify the same name, no behavior change is needed. If both places specify different names, then an error is thrown because the intention of the caller is not clear.
Backwards compatibility
This behavior is trivially polyfillable. It's just a bit of syntactic sugar for developer convenience.
The new syntax will likely apply the new alarm length limit unconditionally, so it will not be backwards-compatible.