Skip to content

docs: add alarms.clearAll() return value Safari exception - #45150

Merged
rebloor merged 1 commit into
mdn:mainfrom
carlosjeurissen:update-alarms-clearall
Sep 3, 2026
Merged

rebloor merged 1 commit into
mdn:mainfrom
carlosjeurissen:update-alarms-clearall

Conversation

@carlosjeurissen

@carlosjeurissen carlosjeurissen commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #45149

Description

This PR adds the return type Safari exception to the return type section.

Motivation

To help developers handle edge cases.

Additional details

Return type discussion in WECG:
w3c/webextensions#1055

Related issues and pull requests

Fixes #45149

@kiaraarose @xeenon FYI

@carlosjeurissen
carlosjeurissen requested a review from a team as a code owner August 14, 2026 18:43
@carlosjeurissen
carlosjeurissen requested review from rebloor and removed request for a team August 14, 2026 18:43
@github-actions github-actions Bot added Content:WebExt WebExtensions docs size/xs [PR only] 0-5 LoC changed labels Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

(comment last updated: 2026-09-03 04:02:44)

@rebloor rebloor self-assigned this Aug 20, 2026
@rebloor

rebloor commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

@carlosjeurissen my reading is that both Chrome and Safari have active patches in their release process to align browser behavior. Could you add details of those so the reader is aware that the situation may change (and, based on the timing of any updates on MDN, they have already changed by the time they read the documentation.)

@bershanskiy

Copy link
Copy Markdown
Contributor

Safari (WebKit) already merged and plans to release the change aligning with Firefox (returning true if at least one alarm was cleared and false if extension had no alarms).
Chrome always returns true but Chrome team currently considers whether they want to align with Firefox and future Safari or propose yet another behavior. WECG meeting agenda has this topic scheduled for today's meeting.

@bershanskiy

Copy link
Copy Markdown
Contributor

Safari Technology Preview 251 released yesterday (August 26) shipped the new behavior (consistent with Firefox).

Comment thread files/en-us/mozilla/add-ons/webextensions/api/alarms/clearall/index.md Outdated
@bershanskiy

Copy link
Copy Markdown
Contributor

During WECG meeting on August 27, 2026, browsers agreed to change the return type of alarms.clearAll() from a Promise<Boolean> to Promise<undefined>.

Safari plans to revert the move from Promise<undefined> to Promise<Boolean> and restore its original behavior.

@github-actions github-actions Bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Aug 28, 2026
@rebloor

rebloor commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

@carlosjeurissen please could you update the note to align with the decision and current status.

@bershanskiy

Copy link
Copy Markdown
Contributor

I'm not sure whether we should update MDN content yet, given the lack of even a single implementation using Promise<undefined>. This borders on developer outreach regarding future plans rather than factual documentation of existing extension platform. From my side, I promise to notify MDN once I and a Chromium CL migrating from Promise<true> to Promise<undefined>.

@bershanskiy

Copy link
Copy Markdown
Contributor

I created Chromium CL 8182627 migrating alarms.clearAll() return value from Promise<true> to Promise<undefined>. The change has a runtime switch to revert to original behavior in case of compatibility issues. Most likely, this change will be merged in time for Google Chrome 155 release. After CL is merged, I expect Chromium devs to publish a PSA on Chromium Extensions mailing list and I will try to post a link here once that occurs. Anyone interested is welcome to follow that CL and bug linked in the CL description.

@rebloor

rebloor commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Thanks @carlosjeurissen. As things seem a little fluid, it may be worth waiting for them to settle down. Let me know when you have the final, settled change.

@carlosjeurissen

Copy link
Copy Markdown
Contributor Author

@rebloor updated the PR to mention future changes to undefined and the recommendation to not rely on the return type. We can always follow up with a new PR once browsers have landed the change to undefined and the release versions are known.

@rebloor rebloor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rebloor
rebloor merged commit e37b064 into mdn:main Sep 3, 2026
9 checks passed
@carlosjeurissen
carlosjeurissen deleted the update-alarms-clearall branch September 4, 2026 08:09
@bershanskiy

Copy link
Copy Markdown
Contributor

I promised to post a message here once Chromium implements the new behavior. Chromium has merged the change and is on track to ship it in Chrome 157. I created #45951 to update MDN content and mdn/browser-compat-data#30716 to update BCD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebExt WebExtensions docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing alarms.clearAll() Safari return type.

4 participants