Wren a web browser where WebAssembly runs everything, JavaScript included

chrome.alarms

Alarms of the extension, kept in state.txt (src/page/ext_api.odin). A delay or a period below extensions.alarms.min_period_ms is raised to it.

Gate: permission alarms; contexts: Background, Popup, Tab. Source: api/ext_alarms.widl.

Methods and properties

MemberResultStatusGate
create(optional string name, optional AlarmCreateInfo alarmInfo)voidhostThe same name replaces the alarm before it.
get(optional string name)Alarmhost
getAll()Alarm[]host
clear(optional string name)boolhost
clearAll()boolhost

Events

EventListener's parametersGate
onAlarmAlarm alarm

Types

Alarm

PropertyType
namestring
scheduledTimef64
periodInMinutes (optional)f64

AlarmCreateInfo

PropertyType
when (optional)f64Milliseconds since the epoch.
delayInMinutes (optional)f64
periodInMinutes (optional)f64

Edit this page on GitHub