Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Document device sleep and persistence behaviour of alarms API #7776

Merged
merged 4 commits into from
Nov 14, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions site/en/docs/extensions/reference/alarms/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ To use the `chrome.alarms` API, declare the `"alarms"` permission in the [manife
}
```

## Concepts and usage

### Device sleep

The behavior of alarms when a device goes to sleep is currently undefined. An alarm will never fire
early but may fire significantly later than expected if a device went to sleep after an alarm was
scheduled.

### Persistence

Alarms generally persist until an extension is updated. However, this is not guarenteed and alarms
may be cleared when the browser is restarted. Consequently, consider storing any important alarms in
storage and making sure they exist each time your service worker starts up.
oliverdunk marked this conversation as resolved.
Show resolved Hide resolved

## Examples

The following examples show how to use and respond to an alarm. To try this API,
Expand Down
Loading